comp • gb.net • serversocket

ServerSocket (gb.net)

This class listens to a socket, so your program can act as a server for both TCP and UNIX protocols.

This class performs its work asynchronously, so your program will not be stopped by the internal work of the server object.

This class is developed to be only a server which accepts or denies connections, all the rest of work (sending data, receiving data...) will be performed by a Socket started by this server (one per each connection).

This class is
Creates a new server socket.
creatable
.
This class is
Enumerate all the socket created by the Accept method.
enumerable
with the FOR EACH keyword.

Properties

Methods Events
Return the number of sockets that have been created by the Accept method.
Count  
Return or set the ethernet interface used by the server socket.
Interface  
Return or set the server socket path for local sockets.
Path  
Return or set the server socket listening port for internet sockets.
Port  
Return the status of the socket as a constant of the Net class.
Status  
Return or set the server socket timeout, in milliseconds.
Timeout  
Returns or sets the type of socket to use.
Type  
Use this method to accept a connection request from a client.
Accept  
Use this method to close all connections stablished by the server, and stop its listening proccess.
Close  
Starts listening at selected TCP port or local Path.
Listen  
Use this method to keep all existing connections alive, but do not accept more until you use the Resume method.
Pause  
Use this method to restart listening for new connections if you stopped this process by using the Pause method.
Resume  
When a client tries to connect to server, this event will raise.
Connection  
This event will raise if some failed in listening process.
Error