Next: TCPIPV6NetworkStreamWriter, Previous: TCPIPV6NetworkStream, Up: Classes [Index]
TCPIPV6UNIXNetworkStreamReader
Classtimeout
An Integer
that contains the number of seconds that the
acceptSock
method (below) should wait for a connection. The
default is 10 seconds.
acceptSock (void
)
Listens for incoming connections on the socket that is bound to
a network address and port by a previous call to openOn
.
If the program receives an incoming connection, acceptSock
creates a new socket to read data from the connection and returns the
socket number, an Integer
, to the calling program.
If the method times out, it returns 0 to the calling program. The
timeout
instance variable determines the number of seconds
the method should wait for incoming connections. The default is
10 seconds.
If an error occurs, the method returns -1 and raises a
SystemErrnoException
.
openOn (void
)
openOn (Integer
port)
openOn (String
hostName, Integer
port)
Binds a TCPIPV6NetworkStreamReader
object to the hostname and
port given as the arguments, if any. The return value is the socket
handle number of the receiver, an Integer
.
If no hostname or port is given, the method binds the socket to the
system constant in6addr_any
, and the port defined by
DEFAULT_TCPIP_PORT, defined by the Ctalk library in the ctalkdefs.h
header file.
If an error occurs, these methods raise an Exception
and return 0.