Metrologic Optimus S Programming Manual page 168

"c" programming guide
Table of Contents

Advertisement

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
SOCK_STREAM
SOCK_DGRAM
SOCK_RAW
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
protocol
TCP
Stream socket
UDP
Datagram socket
ICMP
Raw-protocol interface

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents