Core Function SocketOpt

From Sputnik Wiki
Jump to: navigation, search
SocketOpt( <socket>, <option>, <value> )

Contents

Description

Get or Set a setting on a <socket>.

option

The option to change. See Remarks.

value

Optional; The parameter (varies by option). See Remarks.

Note - If no value is given the CURRENT value of the given option will be returned

Return Value

Returns the value of the previous setting.

Remarks

Blocking

Gets or sets a value that indicates whether the <socket> is in blocking mode

0 = False
1 = True

DontFragment

Gets or sets a value that specifies whether the <socket> allows Internet Protocol (IP) datagrams to be fragmented

0 = False
1 = True

EnableBroadcast

Gets or sets a value that specifies whether the <socket> can send or receive broadcast packets

0 = False
1 = True

ExclusiveAddressUse

Gets or sets a value that specifies whether the <socket> allows only one process to bind to a port

0 = False
1 = True

MulticastLoopback

Gets or sets a value that specifies whether outgoing multicast packets are delivered to the sending application

0 = False
1 = True

NoDelay

Gets or sets a value that specifies whether the stream <socket> is using the Nagle algorithm

0 = False
1 = True

UseOnlyOverlappedIO

Specifies whether the <socket> should only use Overlapped I/O mode

0 = False
1 = True

TTL

Gets or sets a value that specifies the Time To Live (TTL) value of Internet Protocol (IP) packets sent by the <socket>

ReceiveBufferSize

Gets or sets a value that specifies the size of the receive buffer of the <socket>

ReceiveTimeout

Gets or sets a value that specifies the amount of time after which a synchronous SocketReceive() call will time out

SendBufferSize

Gets or sets a value that specifies the size of the send buffer of the <socket>

SendTimeout

Gets or sets a value that specifies the amount of time after which a synchronous SocketSend() call will time out

Example

$value = SocketOpt($Socket, "SendBufferSize");
SocketOpt($Socket, "SendBufferSize", 3);
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox