invisibleroads / invisibleroads/socketIO-client

Can't receive message before sending

Open
#186 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
441
Forks
204
PR merge metrics
No merged PRs in 30d

Description

My server emits a message when a client connects, "authenticate". The client should respond. But with socketIO-client, if I connect and then wait, I never get the "authenticate" message even though the server sent it as usual (I checked with wireshark). I have to send something first from the client, and then send "authenticate" from the server after the server receives that first message from the client.

Is there something I should do to fix this on my side?

```
class MyNamespace(LoggingNamespace):
def on_authenticate(self, args):
print("Got authenticate message!")

with SocketIO('127.0.0.1', 8000, MyNamespace) as socketIO:
# After we connect, server will send us "authenticate"
socketIO.wait()
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.