Questions about phpsocket

Source: Internet
Author: User
Phpsocket problems! In a recent project, php & nbsp; socket communication is required. now I have tested & nbsp;. in TCP, the client can be successfully sent to the server, the server can also return client information. However, in UDP, the program may have problems. you can receive the information on the client, but you can use soc for php socket problems!
A recent project requires php socket communication. now I have tested that the client can be successfully sent to the server under TCP, and the server can also return the client information.
However, in UDP, the program will have a problem. you can receive the information on the client, but if socket_write () is returned, the returned address cannot be found... Then the client cannot accept the information returned by the server!
In this case, I want to help solve this problem.

PHP Warning: socket_write (): unable to write to socket [0]: The socket is not connected.
And (when a sendto call is used to send a datagram socket) no address is provided to send or receive data requests.
Not accepted. ? Socket? Php udp socket_write () shared:
------ Solution --------------------
No. the error message above is clear, that is, there is no connection or the address is incorrect.
Let's look at the code. it's useless to guess.

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.