Answer the question
In order to leave comments, you need to log in
How to work with raw sockets from Js?
Hello. There is a certain socket server written in Python (pseudocode example):
import json, socket
addr = ("", 8080)
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind(addr)
while True:
server.listen(1)
c_addr, c_sock = server.accept()
newThread = ThreadingAPI.API(c_addr, c_sock)
newThread.start()
Answer the question
In order to leave comments, you need to log in
socket is not a websocket and has nothing to do with it.
socket is such a raw socket server that you can write anything on it, but out of the box there is nothing to do with it if you do not know what it is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question