Sock function introduction
Function name | Description |
socket_accept() | Accept a Socket connection |
socket_bind() | Bind the socket to an IP address and port |
socket_clear_error() | Clear the socket error or the last error code |
socket_close() | Close a socket resource |
socket_connect() | Start a socket connection |
socket_create_listen() | Open a socket listening on the specified port |
socket_create_pair() | Generate a pair of undifferentiated sockets into an array |
socket_create() | Generate a socket, which is equivalent to generating a socket data structure |
socket_get_option() | Get the socket option |
socket_getpeername() | Get the IP address of a remote similar host |
socket_getsockname() | Get the IP address of the local socket |
socket_iovec_add() | Add a new vector to a scatter/aggregate array |
socket_iovec_alloc() | This function creates an iovec data structure capable of sending, receiving, reading and writing |
socket_iovec_delete() | Delete an already allocated iovec |
socket_iovec_fetch() | Return the data of the specified iovec resource |
socket_iovec_free() | Release an iovec resource |
socket_iovec_set() | Set iovec New value of data |
socket_last_error() | Get the last error code of the current socket |
socket_listen() | Listen to all connections from the specified socket |
socket_read() | Read data of the specified length |
socket_readv() | Read Get the data from the scattered/aggregated array |
socket_recv() | End the data from the socket to the cache |
socket_recvfrom() | Accept data from the specified socket, if not specified, the current socket will be defaulted |
socket_recvmsg() | Receive messages from iovec |
socket_select() | Multiple selection |
socket_send() | This function sends data to the connected socket |
socket_sendmsg() | Send a message to the socket |
socket_sendto() | Send a message to the socket at the specified address |
socket_set_block() | Set to block mode in the socket |
socket_set_nonblock() | Socket is set to Non-block mode |
socket_set_option() | Set socket options |
socket_shutdown() | This function allows you to close reading, writing, or the specified socket |
socket_strerror() | Returns the specified error number Detailed error of |
socket_write() | Write data to socket cache |
socket_writev() | Write data to scatter/aggregate array |
The above has introduced the php socket function, including the function and Socket aspects. I hope it will be helpful to friends who are interested in PHP tutorials.