socket_accept PHP 4.1.0

resource socket_accept(resource socket)

 

Accepts a connection on the listening socket.

socket_bind PHP 4.1.0

bool socket_bind(resource socket, string addr[, int port])

 

Binds an open socket to a listening port; port is only specified in AF_INET family.

socket_clear_error PHP 4.1.0

void socket_clear_error([resource socket])

 

Clears the error on the socket or the last error code.

socket_close PHP 4.1.0

void socket_close(resource socket)

 

Closes a file descriptor.

socket_connect PHP 4.1.0

bool socket_connect(resource socket, string addr[, int port])

 

Opens a connection to addr:port on the socket specified by socket.

socket_create_listen PHP 4.1.0

resource socket_create_listen(int port[, int backlog])

 

Opens a socket on port to accept connections.

socket_create_pair PHP 4.1.0

bool socket_create_pair(int domain, int type, int protocol, array &fd)

 

Creates a pair of indistinguishable sockets and stores them in fd.

socket_create PHP 4.1.0

resource socket_create(int domain, int type, int protocol)

 

Creates an endpoint for communication in the domain specified by domain, of type specified by type.

socket_get_option PHP 4.3.0

mixed socket_get_option(resource socket, int level, int optname)

 

Gets socket options for the socket.

socket_getpeername PHP 4.1.0

bool socket_getpeername(resource socket, string &addr[, int &port])

 

Queries the remote side of the given socket, which may result in either a host/port or a Unix filesystem path, depending on its type.

socket_getsockname PHP 4.1.0

bool socket_getsockname(resource socket, string &addr[, int &port])

 

Queries the remote side of the given socket, which may result in either a host/port or a Unix filesystem path, depending on its type.

socket_iovec_add PHP 4.1.0

bool socket_iovec_add(resource iovec, int iov_len)

 

Adds a new vector to the scatter/gather array.

socket_iovec_delete PHP 4.1.0

bool socket_iovec_delete(resource iovec, int iov_pos)

 

Deletes a vector from an array of vectors.

socket_iovec_fetch PHP 4.1.0

string socket_iovec_fetch(resource iovec, int iovec_position)

 

Returns the data that is stored in the iovec specified by iovec_id[iovec_position].

socket_iovec_free PHP 4.1.0

bool socket_iovec_free(resource iovec)

 

Frees the iovec specified by iovec_id.

socket_iovec_set PHP 4.1.0

bool socket_iovec_set(resource iovec, int iovec_position, string new_val)

 

Sets the data held in iovec_id[iovec_position] to new_val.

socket_last_error PHP 4.1.0

int socket_last_error([resource socket])

 

Returns the last socket error (either the last used or the provided socket resource).

socket_listen PHP 4.1.0

bool socket_listen(resource socket[, int backlog])

 

Listens for a connection on a socket; backlog sets the maximum number of connections allowed to be waiting.

socket_read PHP 4.1.0

string socket_read(resource socket, int length[, int type])

 

Reads a maximum of length bytes from socket.

socket_readv PHP 4.1.0

bool socket_readv(resource socket, resource iovec_id)

 

Reads from an file descriptor, using the scatter-gather array defined by iovec_id.

socket_recv PHP 4.1.0

int socket_recv(resource socket, string &buf, int len, int flags)

 

Receives data from a connected socket.

socket_recvfrom PHP 4.1.0

int socket_recvfrom(resource socket, string &buf, int len, int flags, string &name[, int &port])

 

Receives data from a socket, connected or not.

socket_recvmsg PHP 4.1.0

bool socket_recvmsg(resource socket, resource iovec, array &control, int &controllen, int &flags, string &addr[, int &port])

 

Receives messages on a socket, whether connection-oriented or not.

socket_select PHP 4.1.0

int socket_select(array &read_fds, array &write_fds, &array except_fds, int tv_sec[, int tv_usec])

 

Runs the select( ) system call on the arrays of sockets with timeouts specified by tv_sec and tv_usec.

socket_send PHP 4.1.0

int socket_send(resource socket, string buf, int len, int flags)

 

Sends data to a connected socket.

socket_sendmsg PHP 4.1.0

bool socket_sendmsg(resource socket, resource iovec, int flags, string addr[, int port])

 

Sends a message to a socket, regardless of whether it is connection-oriented or not.

socket_sendto PHP 4.1.0

int socket_sendto(resource socket, string buf, int len, int flags, string addr[, int port])

 

Sends a message to a socket, whether it is connected or not.

socket_set_nonblock PHP 4.1.0

bool socket_set_nonblock(resource socket)

 

Sets non-blocking mode on a socket resource.

socket_set_option PHP 4.3.0

bool socket_set_option(resource socket, int level, int optname, int|array optval)

 

Sets socket options for the socket.

socket_shutdown PHP 4.1.0

bool socket_shutdown(resource socket[, int how])

 

Shuts down a socket for receiving, sending, or both.

socket_strerror PHP 4.1.0

string socket_strerror(int errno)

 

Returns a string describing an error.

socket_write PHP 4.1.0

int socket_write(resource socket, string buf[, int length])

 

Writes the buffer to the socket resource.

socket_writev PHP 4.1.0

bool socket_writev(resource socket, resource iovec_id)

 

Writes to a file descriptor using the scatter-gather array defined by iovec_id.