class KServerSocket
|
Monitor a port for incoming TCP/IP connections.
More... |
|
|
Public Members
Public Slots
Protected Members
- bool init ( short unsigned int )
- bool init ( const char* _path )
- QSocketNotifier * notifier
- int sock
- int domain
Signals
Detailed Description
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.
KServerSocket ( int _port )
|
Constructor.
Parameters:
_port | the port number to monitor for incoming connections.
|
KServerSocket ( const char *_path )
|
Creates a UNIX domain server socket.
Destructor. Closes the socket if it was not already closed.
[const]
Get the file descriptor assoziated with the socket.
unsigned short getPort ()
|
Returns the port number which is being monitored.
The address.
[virtual slot]
Called when someone connected to our port.
[signal]
A connection has been accepted.
It is your task to delete the KSocket if it is no longer needed.
[protected]
Notifies us when there is something to read on the port.
[protected]
The file descriptor for this socket. sock may be -1.
This indicates that it is not connected.
- Version: $Id: ksock.h,v 1.20 1998/11/11 00:02:55 thufir Exp $
- Author: Torben Weis <weis@stud.uni-frankfurt.de>
- Generated: bhcompile@stripples.devel.redhat.com on Thu Jul 26 13:37:38 200.