Who has a reliable websocket tutorial? I know that once the client is connected to the server
The server does not need to connect the client to the server every time it delivers data to the client.
I have read a lot of tutorials on the Internet ..
Reply to discussion (solution)
The tutorials you found on the Internet are basically reliable.
The socket toolkit covers the network communication functions used. what do you want to do?
The tutorials you found on the Internet are basically reliable.
The socket toolkit covers the network communication functions used. what do you want to do?
You need to show me how many online games I want.
The tutorials you found on the Internet are basically reliable.
The socket toolkit covers the network communication functions used. what do you want to do?
I just want to see that the simplest function connection is enough to receive and close.
Http://www.yxsss.com/sg.php? Fp = 0 & tag = websocket
The client is very simple mainly for servers. you can refer to this server writing method (the client here can be skipped)
You can debug the code before reading the code.
The last time I made a simple task, the implementation was not difficult. if there were not many people, the logic was implemented, which was troublesome for debugging.
There is still one difficulty. the timeout function can be set to 1 with the 4th parameters of socket_select to be non-blocking.
Then determine whether the time has timed out. if the time has timed out, the default processing will be performed.
That's all.
Http://www.oschina.net/code/snippet_230665_21329