Skip to content

Conversation

JasonPierce
Copy link

Admittedly, this may not be the best solution for this issue. That being said, it seems like the EmitEvent("Open") that this PR removes from HandleOpen is accurate, since this instance can be perceived as a lie, being message driven. Whereas, the remaining EmitEvent("Open") in OnOpen is entirely truthful, since it is only fired when WebSocket.OnOpen fires (i.e., upon successful connection).

@prodigga
Copy link

prodigga commented Mar 7, 2017

Hey @JasonPierce, sorry to contact you this way. I was wondering if you had any luck getting a unity build to connect to a server? All the libraries I've found are depircated or really old.

I have a node JS server running and I use the latest version of socket io. The server outputs the current time every second to all connected users as a test.

Every library I've tried fails to establish a connection for one reason or another. Some just don't do anything, others fail at the handshake because they are built to use old versions of socket io (pre version 1).

@JasonPierce
Copy link
Author

Hi @prodigga. I ended up using https://github.com/sta/websocket-sharp directly, forgoing any wrappers like this lib. As you said, they've all been deprecated at this point, and it cuts out another layer of complexity -- reducing issues, etc.

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

Successfully merging this pull request may close these issues.

2 participants