![Texas TMS320C6000 Programmer'S Reference Manual Download Page 65](http://html.mh-extra.com/html/texas/tms320c6000/tms320c6000_programmers-reference-manual_1093844065.webp)
Sockets Programming Interfaces
3-33
Sockets and Stream IO API
be used. These families are defined in the include file INC\SOCKET.H. This
will always be PF_INET (AF_INET) in this implementation.
The socket type parameter specifies the semantics of communication. Cur-
rently defined types are:
SOCK_STREAM
provides sequenced, reliable, two-way connection
based byte streams. An out-of-band data trans-
mission mechanism is supported.
SOCK_STREAMNC
identical to SOCK_STREAM except that received
data is not coalesced into a receive holding buffer.
This eliminates one or two receive data copies
(depending on which recv() socket function is
used), but has the potential of tying up multiple
data packets. It should only be used when the
socket is to receive data in large bursts. Out-of-
band data is supported, but only when the tradi-
tional recv() socket calls are used.
SOCK_DGRAM
supports datagrams – connectionless, unreliable
messages of a fixed (typically small) maximum
length.
SOCK_RAW
similar to SOCK_DGRAM, only allows the use of
any protocol which must be manually constructed
in each datagram by the programmer.
The protocol parameter specifies a particular protocol to be used with the
socket. In this implementation of the stack, SOCK_STREAM must use IPPRO-
TO_TCP, SOCK_DGRAM must use IPPROTO_UDP, and SOCK_RAW is un-
restricted. To remain compatible with the industry, this parameter can be set
to NULL on SOCK_STREAM or SOCK_DGRAM.