|
GEOS SDK TechDocs|
|
7.2 SocketSend() and SocketRecv() |
8 Closing the Connection
To customize a socket's sending and receiving behavior, use
SocketSetIntSocketOption()
(or
SocketSetSocketOption()
if you are using Assembly language). The following options are available:
-
SO_RECV_BUF
:
Receive Buffer
Size
-
To change the size of the buffer used to hold incoming data.
-
SO_SEND_BUF
:
Send Buffer
Size
-
To change the size of the buffer used to hold outgoing data.
-
SO_INLINE
:
In-line
urgent data
-
To force urgent data to be treated the same as normal data. This allows you to poll for both urgent and normal data with a single
SocketRecv()
command. Of course, setting this option means that you will not receive urgent data as soon as possible.
-
SO_NODELAY
:
No Delay
for small packets
-
To force a driver to send small packets without waiting for other packets to bundle together. Drivers often delay sending small packets, waiting for other packets to bundle together in one larger packet. This is oftentimes more efficient.
-
SO_OWNER
:
Owning Thread
for socket
-
To specify a new owning thread for a socket. When the owning thread detaches from the Socket library (this happens automatically when the thread exits), the socket will be freed; any attempts to use the freed socket will result in errors. To make a socket survive its thread, you must assign it to a new thread. This option does not actually affect how the socket sends or receives data.
You may find out the current options for a socket by calling
SocketGetIntSocketOption()
(
SocketGetSocketOption()
if you're using Assembly language).
|
GEOS SDK TechDocs|
|
7.2 SocketSend() and SocketRecv() |
8 Closing the Connection