Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About connect to the latest node.js socket.io server #192

Open
yujiang opened this issue Jul 11, 2018 · 3 comments
Open

About connect to the latest node.js socket.io server #192

yujiang opened this issue Jul 11, 2018 · 3 comments

Comments

@yujiang
Copy link

yujiang commented Jul 11, 2018

if you want to connect to a node.js socket.io server, you should modify the parsers.py as:

def _read_packet_length(content, content_index):
end = content_index
while content[end] != ":":
end += 1
packet_length_string = content[content_index:end]
end += 1
content_index = end
#print("_read_packet_length",packet_length_string)
return content_index, int(packet_length_string)

def _read_packet_text(content, content_index, packet_length):
packet_text = content[content_index:content_index + packet_length]
#print("_read_packet_text",packet_text)
return content_index + packet_length, packet_text

@xxdoor
Copy link

xxdoor commented Jul 16, 2018

works for me!!!!!

@utkarshmalik211
Copy link

SocketIO('localhost',1337,wait_for_connection=False, transports=('websocket'), resource='socket.io', hurry_interval_in_seconds=1 )

Gives ConnectionError: unexpected status code (400 {"code":0,"message":"Transport unknown"})

@dpanic
Copy link

dpanic commented Sep 7, 2018

I have same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants