socket_set_nonblock

Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Sets nonblocking mode for file descriptor fd
<?php socket_set_nonblock(Socket $socket): bool
<?php         protected int $bufferSize = 1024,

        protected float $timeout = 0.1,

    ) {

        socket_set_nonblock($this->socket);

    }
<?php     public function write(string $payload): self

    {

        socket_set_nonblock($this->socket);



        while ($payload !== '') {

            $write = [$this->socket];
<?php     public function read(): Generator

    {

        socket_set_nonblock($this->socket);



        while (true) {

            $read = [$this->socket];