Instead, it creates a new socket which becomes connected. See Socket Addresses, for information about the format of the information.Īccepting a connection does not make socket part of the connection. The addr and length-ptr arguments are used to return information about the name of the client socket that initiated the connection. (You can use select to wait for a pending connection, with a nonblocking socket.) See File Status Flags, for information about nonblocking mode. The accept function waits if there are no connections pending, unless the socket socket has nonblocking mode set. This function is used to accept a connection request on the server socket socket. Introduction Used parts of BSD Sockets API Functions list int accept (int socket, struct sockaddr addr, socklen_t length_ptr) Initialize the socket structure and make a socket address. int socket (int namespace, int style, int protocol).int send (int socket, void *buffer, size_t size, int flags).int read (int socket, void *buffer, size_t size).int listen (int socket, unsigned int n).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |