160
"C" Programming Guide For Optimus S/R
Although options may exist at multiple protocol levels, they are always present
at the uppermost socket level. Options affect socket operations, such as the
packet routing and OOB data transfer.
When manipulating socket options, the level at which the option resides and
the name of the option must be specified.
To manipulate options at the socket level, level is specified as
SOL_SOCKET.
To manipulate options at any other level, the protocol number of the
appropriate protocol controlling the option is supplied.
For example, the following options are recognized at the socket level.
level
= SOL_SOCKET
SO_DEBUG
Enables recording of debugging information
SO_REUSEADDR
Enables local address reuse
SO_KEEPALIVE
Enables keep connections alive
SO_DONTROUTE Enables routing bypass for outgoing messages
SO_BROADCAST Enables permission to transmit broadcast messages
SO_BINDTODEVI
CE
(?)
SO_LINGER
Lingers on close if unsent data is present
SO_OOBINLINE
Enables reception of out-of-band data in band
SO_SNDBUF
Sets buffer size for sends
SO_RCVBUF
Sets buffer size for receives
level
= IPPROTO_TCP
TCP_NODELAY
Disables the Nagle algorithm for send coalescing
The
optval
and
optlen
parameters are used to access option values.
Return
If successful, it returns 0.
On error, it returns -1.
The global variable
errno
is set to indicate the error condition encountered.
See Also
getsockopt
shutdown
Purpose
To shut down part of a TCP connection.
Syntax
int shutdown (SOCKET s, int how);
s
Descriptor identifying a socket
how
Specifies the type of shut down
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...