Who has a reliable websocket tutorial-php Tutorial?

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.