|
|
Monitor a port for incoming TCP/IP connections.
You can use a KServerSocket to listen on a port for incoming connections. When a connection arrived in the port, a KSocket is created and the signal accepted is raised. Make sure you always connect to this signal. If you dont the ServerSocket will create new KSocket's and no one will delete them!
If socket() is -1 or less the socket was not created properly.
|
Constructor.
Parameters:
_port | the port number to monitor for incoming connections. |
|
Creates a UNIX domain server socket.
~ |
[virtual]
Destructor. Closes the socket if it was not already closed.
int |
[const]
Get the file descriptor assoziated with the socket.
unsigned short int |
Returns the port number which is being monitored.
unsigned long |
The address.
void |
[virtual slot]
Called when someone connected to our port.
void |
[signal]
A connection has been accepted. It is your task to delete the KSocket if it is no longer needed.
bool |
[protected]
bool |
[protected]
QSocketNotifier * |
[protected]
Notifies us when there is something to read on the port.
int |
[protected]
The file descriptor for this socket. sock may be -1. This indicates that it is not connected.
int |
[protected]