Table of Contents

Class: wimd_server PmwContribD-r2_0_1/SampleApps/WhackyChat/Server/wimd_server.py

This server class uses asyncore to accept and dispatch requests.

Base Classes   
asyncore.dispatcher
Methods   
__init__
add_user_connection
drop_user_connection
get_user_connection
handle_accept
handle_close
handle_connect
handle_expt
handle_oob
handle_read
handle_write
log
loop
read_conf_files
send_motd
wimd_MESG
wimd_UPDT
  __init__ 
__init__ (
        self,
        sock,
        conf_filename,
        )

  add_user_connection 
add_user_connection (
        self,
        uid,
        connection,
        )

Associated a connection with a user id so that when a message needs to be sent to a particular user it is easy to look up the value.

Exceptions   
WimdServerError( 'Duplicate user' )
  drop_user_connection 
drop_user_connection ( self,  uid )

Forget about the connection to a particular user.

  get_user_connection 
get_user_connection ( self,  uid )

Return the connection for the user specified by uid, unless that user is not connected. If the user is not connected, raises a KeyError.

  handle_accept 
handle_accept ( self )

  handle_close 
handle_close ( self )

  handle_connect 
handle_connect ( self )

  handle_expt 
handle_expt ( self )

  handle_oob 
handle_oob ( self )

  handle_read 
handle_read ( self )

  handle_write 
handle_write ( self )

  log 
log ( self,  message )

  loop 
loop ( self )

  read_conf_files 
read_conf_files ( self )

Read the configuration files which control the server behavior.

Exceptions   
WimdServerError( 'Could not open configuration file.', self.conf_filename, str(msg.args [ 1 ] ), )
  send_motd 
send_motd ( self,  conn )

Given a connection, send the message of the day.

  wimd_MESG 
wimd_MESG (
        self,
        fromuid,
        nick,
        touid,
        msg,
        )

Given a UID and a message, send the message to that user.

  wimd_UPDT 
wimd_UPDT (
        self,
        message_type,
        nick,
        uid,
        message='',
        )


Table of Contents

This document was automatically generated on Mon Sep 17 17:47:46 2001 by HappyDoc version r2_0