Core Function SocketOpt
(→Remarks) |
m (1 revision) |
||
| (3 intermediate revisions by one user not shown) | |||
| Line 22: | Line 22: | ||
=== Remarks === | === Remarks === | ||
| − | |||
| − | |||
| − | |||
==== Blocking ==== | ==== Blocking ==== | ||
| Line 32: | Line 29: | ||
1 = True | 1 = True | ||
</pre> | </pre> | ||
| + | |||
| + | ==== DontFragment ==== | ||
| + | Gets or sets a value that specifies whether the <socket> allows Internet Protocol (IP) datagrams to be fragmented | ||
| + | <pre> | ||
| + | 0 = False | ||
| + | 1 = True | ||
| + | </pre> | ||
| + | |||
| + | ==== EnableBroadcast ==== | ||
| + | Gets or sets a value that specifies whether the <socket> can send or receive broadcast packets | ||
| + | <pre> | ||
| + | 0 = False | ||
| + | 1 = True | ||
| + | </pre> | ||
| + | |||
| + | ==== ExclusiveAddressUse ==== | ||
| + | Gets or sets a value that specifies whether the <socket> allows only one process to bind to a port | ||
| + | <pre> | ||
| + | 0 = False | ||
| + | 1 = True | ||
| + | </pre> | ||
| + | |||
| + | ==== MulticastLoopback ==== | ||
| + | Gets or sets a value that specifies whether outgoing multicast packets are delivered to the sending application | ||
| + | <pre> | ||
| + | 0 = False | ||
| + | 1 = True | ||
| + | </pre> | ||
| + | |||
| + | ==== NoDelay ==== | ||
| + | Gets or sets a value that specifies whether the stream <socket> is using the Nagle algorithm | ||
| + | <pre> | ||
| + | 0 = False | ||
| + | 1 = True | ||
| + | </pre> | ||
| + | |||
| + | ==== UseOnlyOverlappedIO ==== | ||
| + | Specifies whether the <socket> should only use Overlapped I/O mode | ||
| + | <pre> | ||
| + | 0 = False | ||
| + | 1 = True | ||
| + | </pre> | ||
| + | |||
| + | ==== 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 === | === Example === | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
| + | $value = SocketOpt($Socket, "SendBufferSize"); | ||
SocketOpt($Socket, "SendBufferSize", 3); | SocketOpt($Socket, "SendBufferSize", 3); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] | ||
Latest revision as of 12:37, 14 June 2015
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);