Connect JavaScript WebSocket To C Winsock
I managed to connect my JavaScript client to C++ server (I'm using winsock), and the server receives a HTTP header, but I can't send or receive anything else after that. The server
Solution 1:
A webSocket connection uses a whole connection scheme and it's own data format (e.g. it is its own protocol). To receive webSocket connections , you have to support the whole webSocket protocol, including the HTTP connection scheme, the security negotiation and the data frame format.
Since there are many pre-written implementations for lots of languages, most people will obtain and use an existing webSocket server implementation rather than rewrite it all from scratch.
You can see an overview of what it takes for Writing webSocket servers in that article.
Post a Comment for "Connect JavaScript WebSocket To C Winsock"