Lines Matching refs:socket
16 * TCP socket server to accept client connections.
71 * Create the socket server and bind to a specific port to listen for clients.
92 throw new ConnectionException('The port must be set if not using a unix based socket.');
100 $socket = @\stream_socket_server(
107 if ($socket === false) {
109 'Unable to open %s socket (%s): %s',
115 $this->socket = $socket;
126 $socket = @\stream_socket_accept($this->socket, $timeout);
127 if (\is_resource($socket)) {
128 $socket = new Socket($socket, \array_merge($this->options, [
131 $this->clients[] = $socket;
134 return $socket instanceof Socket ? $socket : null;
138 * Receive data from a UDP based socket. Optionally get the IP address the data was received from.
149 $this->socket,
165 * @param Socket $socket
167 public function removeClient(Socket $socket): void
169 if (($index = \array_search($socket, $this->clients, true)) !== false) {
175 * Create the socket server. Binds and listens on a specific port
195 * Create a TCP based socket server.
219 * Created a UDP based socket server.
243 * Created a UNIX based socket server.