<?php socket_write(Socket $socket, string $data, ?int $length = null): int|false
<?php $length = strlen($payload); $amountOfBytesSent = socket_write($this->socket, $payload, $length); if ($amountOfBytesSent === false || $amountOfBytesSent === $length) { break;