![]() |
win 7 home basic Accepting Connections - The GNU C
— Function: int accept (int socket, struct sockaddr *addr, socklen_t *length_ptr)
This function is used to accept a connection request on the server socket socket. The accept function waits if there are no connections pending, unless the socket socket has nonblocking mode set. (You can use select to wait for a pending connection, with a nonblocking socket.) See File Status Flags,office Standard 2010 activation key, for information about nonblocking mode. The addr and length-ptr arguments are used to return information about the name of the client socket that initiated the connection. See Socket Addresses, for information about the format of the information. Accepting a connection does not make socket part of the connection. Instead,win 7 home basic, it creates a new socket which becomes connected. The normal return value of accept is the file descriptor for the new socket. After accept, the original socket socket remains open and unconnected,microsoft office Home And Business 2010 update key, and continues listening until you close it. You can accept further connections with socket by calling accept again. If an error occurs, accept returns -1. The following errno error conditions are defined for this function: EBADFThe socket argument is not a valid file descriptor. ENOTSOCKThe descriptor socket argument is not a socket. EOPNOTSUPPThe descriptor socket does not support this operation. EWOULDBLOCKsocket has nonblocking mode set,office 2007 Pro keygen, and there are no pending connections immediately available. This function is defined as a cancellation point in multi-threaded programs,microsoft office 2010 Home And Student product key, so one has to be prepared for this and make sure that allocated resources (like memory, files descriptors, semaphores or whatever) are freed even if the thread is canceled. |
All times are GMT. The time now is 05:38 AM. |
Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum