Lines Matching refs:socket
16 * Represents a generic socket.
39 protected $socket;
103 $this->socket = $resource;
112 if ($this->socket !== null) {
125 \stream_set_blocking($this->socket, $block);
126 while (\strlen((string) ($buffer = \fread($this->socket, $this->options['buffer_size']))) > 0) {
130 \stream_set_blocking($this->socket, false);
133 \stream_set_blocking($this->socket, true);
144 @\fwrite($this->socket, $data);
155 \stream_set_blocking($this->socket, $block);
165 return $this->socket !== null && !@\feof($this->socket);
181 if ($this->socket !== null) {
182 \stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
184 $this->socket = null;
200 \stream_set_blocking($this->socket, true);
201 $result = \stream_socket_enable_crypto($this->socket, $encrypt, $this->options['ssl_crypto_type']);
202 \stream_set_blocking($this->socket, false);
234 $socket = @\stream_socket_client(
242 if ($socket === false) {
249 $this->socket = $socket;
257 * Get the options set for the socket.
267 * Create a socket by connecting to a specific host.
280 * Create a UNIX based socket.
282 * @param string $file The full path to the unix socket.
301 * Create a TCP based socket.
314 * Create a UDP based socket.
359 \stream_set_timeout($this->socket, $this->options['timeout_read']);