File 'net/server.cls' (part of 'Pool_Net')
Home | Packages | Files | Procedures | Classes | Namespaces | Keywords | External packages
Class 'server'
Attach (connId)
|
|
Argument: connId
|
Connection identifier referencing into connMap.
|
Detach (connId)
|
|
Argument: connId
|
Connection identifier referencing into connMap.
|
DoCloseConnection (connId)
|
|
Argument: connId
|
Connection identifier referencing into connMap.
|
GreetPeer (connId)
|
|
Argument: connId
|
Connection identifier referencing into connMap.
|
HandleCommand (connId sock)
|
|
Argument: connId
|
Connection identifier referencing into connMap.
|
Argument: sock
|
Direct access to the channel representing the connection.
|
HandleNewConnection (sock rHost rPort)
|
|
Notes: This is the part of the code you have to change if you want to implement a host based access scheme.
|
Argument: sock
|
The channel handle of the new connection.
|
Argument: rHost
|
The host the client resides on.
|
Argument: rPort
|
The port used by the client.
|
HandleUnknownCmd (connId cmd line)
|
|
Argument: connId
|
Connection identifier referencing into connMap.
|
Argument: cmd
|
The name of the command not understood by the server.
|
Argument: line
|
The complete line sent by the client.
|
InitializeNewConnection (connId)
|
|
Argument: connId
|
Connection identifier referencing into connMap.
|
Log (level args)
|
|
Argument: level
|
Relative importance of the logged message. Should be one of the strings returned by ::pool::syslog::levels.
|
Argument: args
|
List containing the texts to log.
|
Respond2Client (conn ok text)
|
|
Argument: conn
|
Descriptor of connection to write to.
|
Argument: ok
|
Primary response, specific to the server subclass
|
Argument: text
|
Additional text following the primary response.
|
SetCmdMap (map)
|
|
Argument: map
|
The mapping in 'array set/get' format.
|
managesSock (sock)
|
|
Argument: sock
|
The handle of the socket to look for.
|
Returns: a boolean value. 1 indicates that the socket is handled here.
|
reportError (sock errmsg)
|
|
Argument: sock
|
Handle of the channel representing the connection.
|
Argument: errmsg
|
The message to print out.
|
- port
- The port the server shall listen on for new connections. Must be set by subclasses. The default value causes an error in start.
- cmdMap
- Maps a command name to the method handling it. Must be set by subclasses, see SetCmdMap.
- sockMap
- Together with connMap the fundamental datastructure of a server. This array maps from socket handles to a 3-element list containing the remote host, remote port and internal connection id of the connection running over the socket.
- connMap
- Together with sockMap the fundamental datastructure of a server. This array maps from internal connection ids to the handle of the socket used to talk to the client.
Home | Packages | Files | Procedures | Classes | Namespaces | Keywords | External packages
Generated by AutoDoc 2.4 at 09/14/2000, invoked by Andreas Kupries