I need to send a big amount of data with a single shot. But socket_write sends only a part of it. The function and the $buffer variable are correct:
socket_write($socket, $buffer, strlen($buffer));
Maybe it is possible to customize the limit of buffer or something?
There are many solutions on this issue at http://php.net/manual/en/function.socket-write.php but they all separating buffer to send it part by part.