
162
"C" Programming Guide For Optimus S/R
The
protocol
argument specifies a particular protocol to be used with the
socket. Normally only a single protocol exists to support a particular
socket type within a given protocol family. However, it is possible that
many protocols may exist, in which case a particular protocol must be
specified in this manner. The protocol number to use is particular to the
"communication domain" in which communication is to take place.
The allowed combination of
type
and
protocol
parameters are as follows:
type
protocol
SOCK_STREAM
TCP
Stream socket
SOCK_DGRAM
UDP
Datagram socket
SOCK_RAW
ICMP
Raw-protocol interface
Return
If successful, it returns a non-negative integer (>=0) as a descriptor referencing
the socket.
On error, it returns -1.
The global variable
errno
is set to indicate the error condition encountered.
See Also
accept, bind, closesocket, connect, getpeername, getsockname, getsockopt,
ioctlsocket, listen, recv, recvfrom, select, send, sendto, setsockopt, shutdown
Содержание 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...