walkor / workerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
http://www.workerman.net
MIT License
11.03k stars 2.25k forks source link

TCP connection->send always returns null #1031

Open muramidaza opened 2 months ago

muramidaza commented 2 months ago

When sending data to a TCP connection, NULL is always returned. But the message always went to the addressee. Perhaps some settings need to be made?

walkor commented 2 months ago

Sending data is asynchronous, and we cannot predict whether the data will actually be sent to the other party, so we return null which indicates that the data has been written to the application layer send buffer of the connection, waiting to be written to the socket send buffer of the system layer. https://manual.workerman.net/doc/en/tcp-connection/send.html