Home |
Function getsockopt |
Function getsockoptGet a socket option. int getsockopt(SOCKET socket, int level, int option_name, char * option_value, int * optionlen); ParameterssocketSocket returned by socket. levelProtocol level. Must be SOL_SOCKET. option_nameOption to query. See below and setsockopt for the options supported and the format of option_value for each option. option_valueBuffer which will contain the value for the requested option. optionlenPointer to length of * option_value. return valueReturns 0 if successful, otherwise SOCKET_ERROR. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. Section Error Codes further describes each error. Possible values for this function are:
getsockopt extracts the current value for a socket option associated with it. The format of option_value is dependent upon the option retrieving. The length of option_value is passed to this function in optionlen and the actual length of valid information stored in option_value is returned in optionlen. In addition to the options listed for function setsockopt, getsockopt also supports these options:
getsockopt Options Summary
|