The Windows Sockets API interface provided by this system (winking) is a function (routine) as defined in version 1.1 of WINSOCK (as appendix) published on January 20, 1993; includes 30 Berkeley Software Dis Tribution (BSD) function and 16 functions that conform to the Windows message-driven feature.
(one) Inet_ntoa (): Converts a network address into a "point format" string.
Format: Char FAR * PASCAL FAR inet_ntoa (struct in_addr in);
Parameter: In a structure that represents an Internet address
Return value: Success-a "dot format" (dotted) string representing the address
Failed-NULL
Description: This function converts an Internet address into a "a.b.c.d" string format.
() ioctlsocket (): Controls the mode of the Socket.
Format: int PASCAL FAR ioctlsocket (SOCKET s, long cmd, u_long FAR *ARGP);
Parameters: s Socket identification code, CMD instruction name, argp pointing to cmd parameters of the index
Return value: Success-0
Failed-Socket_error (call WSAGetLastError () for reasons)
Description: This function is used to get or set the operating parameters of the Socket. The instructions provided are as follows:
Fionbio--Switch non-blocking mode
Fionread--The amount of data that can be read from the Socket
Siocatmark--OOB data has been read out (* Temporarily do not provide this feature)
() Listen (): Set Socket for listening status, ready to be connected.
Format: int PASCAL FAR Listen (SOCKET s, int backlog);
Parameter: The identifier of the S Socket, backlog the maximum number of connections required before the connection is completed (before the Accept () has been called)
Return value: Success-0
Failed-Socket_error (call WSAGetLastError () for reasons)
Description: The user can use this function to set the Socket into the listening state, and set up how many can be in the not really complete the connection before the end of the connection requirements. (The current maximum limit is 5, the minimum value is 1)