This class is a convenience class for accepting incoming TCP connections. You can specify the port or have TQServerSocket pick one, and listen on just one address or on all the machine's addresses.
Using the API is very simple: subclass TQServerSocket, call the constructor of your choice, and implement newConnection() to handle new incoming connections. There is nothing more to do.
Creates a server socket object, that will serve the given \fIport\fR on all the addresses of this host. If \fIport\fR is 0, TQServerSocket will pick a suitable port in a system-dependent manner. Use \fIbacklog\fR to specify how many pending connections the server can have.
\fBWarning:\fR On Tru64 Unix systems a value of 0 for \fIbacklog\fR means that you don't accept any connections at all; you should specify a value larger than 0.
Creates a server socket object, that will serve the given \fIport\fR only on the given \fIaddress\fR. Use \fIbacklog\fR to specify how many pending connections the server can have.
\fBWarning:\fR On Tru64 Unix systems a value of 0 for \fIbacklog\fR means that you don't accept any connections at all; you should specify a value larger than 0.
This constructor, in combination with setSocket(), allows us to use the TQServerSocket class as a wrapper for other socket types (e.g. Unix Domain Sockets under Unix).
This causes any backlogged connections (connections that have reached the host, but not yet been completely set up by calling TQSocketDevice::accept()) to be severed.
Returns the address on which this object listens, or 0.0.0.0 if this object listens on more than one address. ok() must be TRUE before calling this function.
This pure virtual function is responsible for setting up a new incoming connection. \fIsocket\fR is the fd (file descriptor) for the newly accepted connection.
Returns the port number on which this server socket listens. This is always non-zero; if you specify 0 in the constructor, TQServerSocket will pick a non-zero port itself. ok() must be TRUE before calling this function.