Closed beef9999 closed 2 years ago
The code is in https://openswoole.com/docs/modules/swoole-coroutine-server#quick-start-example
$data = $conn->recv();
Looks like the buffer is dynamically allocated. How can I specify the buffer to a fixed size?
The $conn is the Swoole\Coroutine\Socket object, the first parameter of recv can set the buffer size
$conn
Swoole\Coroutine\Socket
The code is in https://openswoole.com/docs/modules/swoole-coroutine-server#quick-start-example
Looks like the buffer is dynamically allocated. How can I specify the buffer to a fixed size?