Programmer's Reference
- socket: aFamily type: aType protocol:
aProtocol
- Creates a new socket in family aFamily of type aType
and with protocol aProtocol. If successful, returns a new
SciSocket.
- aFamily
- The address family. The only currently supported option for
parameter aFamily is AFINET which is the ARPA Internet address
format
- aType
- The socket type. The currently supported options for the parameter
aType are:
- SOCKSTREAM
- Provides sequenced, reliable, two-way, connection-based byte streams with
an out-of-band data transmission mechanism. Uses TCP for the Internet
address family.
- SOCKDGRAM
- Supports datagrams, which are connectionless, unreliable buffers of a
fixed (typically small) maximum length. Uses UDP for the Internet
address family
- newDatagramSocket
- Creates a new datagram socket in the AFINET family with IP as the
protocol.
- newStreamSocket
- Creates a new stream socket in the AFINET family with IP as the
protocol.
- aProtocol
- The protocol. The only currently supported option for parameter
aProtocol is IP. This parameter sets the default protocol,
which is automatically determined based on the aFamily and
aType. i.e., with aFamily AFINET
and aType of SOCKSTREAM the aType defaults to
TCP. If aType is SOCKDGRAM, aType defaults to
UDP.
- Note:
- Note that all sockets are created as blocking by default (see socket).
The blocking/non-blocking attribute can be changed at any time with the
ioctl operation. Operations on blocking sockets that will
block (e.g., send, sendTo, recv, recvFrom, accept, connect and
close) must be made from a Smalltalk process that can afford to block.
- Note:
- Blocking calls from the UI Process is not recommended as the User Interface
will not available for the duration of the call. Blocking calls from
the context of a callback are not allowed and will return the error
EACCES.
The socket: aFamily type: aType protocol:
aProtocol operation is unsucessful if any of the following errors
occur: ENOTINITIALISED, ENETDOWN, EAFNOSUPPORT, EINPROGRESS, EMFILE,
ENOBUFS, EPROTONOSUPPORT, EPROTOTYPE, ESOCKTNOSUPPORT. For detailed
information on these errors, see Error values.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]