class KServerSocket
|
Monitor a port for incoming TCP/IP connections.
More... |
|
|
Public Methods
Public Slots
Signals
Protected Methods
- bool init ( short unsigned int )
- bool init ( const char *_path )
Protected Members
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 ( unsigned short 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 int port ()
|
Returns the port number which is being monitored.
unsigned long ipv4_addr ()
|
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.37 2000/01/19 23:50:45 garbanzo Exp $
- Author: Torben Weis <weis@stud.uni-frankfurt.de>
- Generated: root@tantive.terraplex.com on Sun Feb 27 17:39:19 2000, using kdoc 2.0a33.