next up previous contents
Next: setSockOpt Up: Methods Previous: getSockName   Contents

getSockOpt

Description

Retrieves the socket option.


Syntax

socket.getSockOpt(name, level)


Parameters

name
Integer. Specifies the socket option for which the value is to be retrieved
level
Integer. Specifies the level at which the option is defined

Level Name Return Type Description
0xFFFF 0x0002 Boolean Whether the socket is listening.
0x0020 Boolean Whether the socket is configured for the transmission of broadcast messages.
0x0001 Boolean Whether the debugging is enabled.
 0x0080 Boolean Whether the SO_LINGER(0x0080) option is disabled.
0x0010 Boolean Whether the routing is disabled.
0x1007 Integer Retrieve error status and clear.
0x0008 Boolean Keep-alives are being sent
0x0080 Integer Returns the current linger options.
0x0100 Boolean Whether the out-of-band data is being received in the normal data stream.
0x1002 Integer Buffer size for receives.
0x0004 Boolean Whether the socket can be bound to an address which is already in use.
0x1001 Integer Buffer size for sends.
0x1008 Integer The type of the socket (for example, $SOCK_STREAM).
6 0x0001 Boolean Whether the Nagle algorithm is disabled for send coalescing.


Returns

Depends on the socket option name.



next up previous contents
Next: setSockOpt Up: Methods Previous: getSockName   Contents
Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.