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.
SetSockOpt (): Sets the state of the Socket.
Format: int PASCAL FAR setsockopt (SOCKET s,int level,int optname,const char FAR *optval,int);
Parameters: s Socket identification code, level option set level,optname option name, optval option set value, Optlen option set value length
Return value: Success-0
Failed-Socket_error (call WSAGetLastError () for reasons)
Description: This function is used to set some options for the Socket to change its action.
The options that can be changed are: (see Winsock version 1.1, page 54)
Value Type
-----------------------------------------------
So_broadcast BOOL
*so_debug BOOL
So_dontlinger BOOL
*so_dontroute BOOL
*so_keepalive BOOL
So_linger struct Linger far*
So_oobinline BOOL
*so_rcvbuf int
SO_REUSEADDR BOOL
*so_sndbuf int
Tcp_nodelay BOOL
() shutdown (): Stop Socket receive/transmit function.
Format: int PASCAL FAR shutdown (SOCKET s, int how);
Parameter: The identifier of the S Socket, how do I represent the flag that should stop those actions
Return value: Success-0
Failed-Socket_error (call WSAGetLastError () for reasons)
Description: This function is used to stop the subsequent receipt or transfer of the Socket.
If you have a value of 0, you no longer receive data.
If the value of how is 1, the transfer of data is no longer allowed.