PHP Socket Function List

Source: Internet
Author: User
Tags set socket socket error
This article has shared the PHP Socket function library commonly used functions, has the research PHP socket programming friend, may refer to the study.

PHP Socket Function Library:

Function name Description socket_accept () accepts a socket connection socket_bind () binds the socket to an IP address and port Socket_clear_error () clears 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 listener on the specified port Socket_create_pair () Produces a pair of undifferentiated sockets into an array socket_create () produces a socket equivalent to a data structure that produces a socket socket_get_option () Gets the socket option socket_ Getpeername () Gets the IP address of the remote similar host socket_getsockname () gets the IP address of the local socket Socket_iovec_add () adds a new vector to a scattered/aggregated array Socket_iovec _alloc () This function creates a IOVEC data structure that is capable of sending received reads and writes Socket_iovec_delete () deletes an assigned Iovecsocket_iovec_fetch () that returns the specified Iovec resources socket_ Iovec_free () frees a Iovec resource Socket_iovec_set () to set Iovec data new value Socket_last_error () gets the last error code of the current socket Socket_listen () Listens for all connections by the specified socket Socket_read () reads data of the specified length SOCKET_READV () reads data from the scatter/aggregate array socket_recv () ends the data from the socket to the cache Socket_recvfrom () accept the data from the specified socket, if not specified, the default current socketsocket_recvmsg () accepts the message from Iovec Socket_select () multiple selection socket_send () This function sends the data to the connected socketsocket_sendmsg () to send a message to Socketsocket_sendto () to send a message to the Socketsocket_set_block () of the specified address Set as block mode in socket SOCKET_SET_NONBLOck () socket set to non-block mode socket_set_option () Set socket option Socket_shutdown () This function allows you to close the read, write, or specified Socketsocket_strerror () Returns the minute error of the specified error number Socket_write () writes data to the socket cache Socket_writev () writes data to the scatter/aggregate array
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.