Socket Functions
Table of Contents
- socket_accept — Accepts a connection on a socket
- socket_addrinfo_bind — Create and bind to a socket from a given addrinfo
- socket_addrinfo_connect — Create and connect to a socket from a given addrinfo
- socket_addrinfo_explain — Get information about addrinfo
- socket_addrinfo_lookup — Get array with contents of getaddrinfo about the given hostname
- socket_bind — Binds a name to a socket
- socket_clear_error — Clears the error on the socket or the last error code
- socket_close — Closes a socket resource
- socket_cmsg_space — Calculate message buffer size
- socket_connect — Initiates a connection on a socket
- socket_create_listen — Opens a socket on port to accept connections
- socket_create_pair — Creates a pair of indistinguishable sockets and stores them in an array
- socket_create — Create a socket (endpoint for communication)
- socket_export_stream — Export a socket extension resource into a stream that encapsulates a socket
- socket_get_option — Gets socket options for the socket
- socket_getopt — Alias of socket_get_option
- socket_getpeername — Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type
- socket_getsockname — Queries the local side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type
- socket_import_stream — Import a stream
- socket_last_error — Returns the last error on the socket
- socket_listen — Listens for a connection on a socket
- socket_read — Reads a maximum of length bytes from a socket
- socket_recv — Receives data from a connected socket
- socket_recvfrom — Receives data from a socket whether or not it is connection-oriented
- socket_recvmsg — Read a message
- socket_select — Runs the select() system call on the given arrays of sockets with a specified timeout
- socket_send — Sends data to a connected socket
- socket_sendmsg — Send a message
- socket_sendto — Sends a message to a socket, whether it is connected or not
- socket_set_block — Sets blocking mode on a socket resource
- socket_set_nonblock — Sets nonblocking mode for file descriptor fd
- socket_set_option — Sets socket options for the socket
- socket_setopt — Alias of socket_set_option
- socket_shutdown — Shuts down a socket for receiving, sending, or both
- socket_strerror — Return a string describing a socket error
- socket_write — Write to a socket
- socket_wsaprotocol_info_export — Exports the WSAPROTOCOL_INFO Structure
- socket_wsaprotocol_info_import — Imports a Socket from another Process
- socket_wsaprotocol_info_release — Releases an exported WSAPROTOCOL_INFO Structure
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-ref.sockets.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.