stream_socket_shutdown

Supported Versions: PHP 5 >= 5.2.1, PHP 7, PHP 8
Shutdown a full-duplex connection
<?php stream_socket_shutdown(resource $stream, int $mode): bool
<?php         @\stream_socket_shutdown($this->stream, \STREAM_SHUT_RDWR);

        \stream_set_blocking($this->stream, false);

    }
<?php     {

        $client = stream_socket_client('tcp://localhost:' . $this->port);

        fwrite($client, "foo\n");

        stream_socket_shutdown($client, STREAM_SHUT_WR);



        $mock = $this->expectCallableOnceWith("foo\n");
<?php     {

        $client = stream_socket_client($this->uds);

        fwrite($client, "foo\n");

        stream_socket_shutdown($client, STREAM_SHUT_WR);



        $mock = $this->expectCallableOnceWith("foo\n");