Table of Contents

Module: chatroom swocket/handler/chatroom.py

This is an example of a simple one-room chatroom handler that depends on the authorization handler passing a valid user and userKey. userKey is anything that can uniquely identify the user, could be as simple as the connection ID, short username, etc. user is the display name for the client to use. They can often be the same value, but the client must keep track of other users userKey if they are implementing private messages.

As an exercise, you should re-implement this module to allow users to change their user value (display name). The functionality would be similar to login/logout, using self.sendEveryone()

Functions   
handlerInit
  handlerInit 
handlerInit ( parent,  n )

This handler requires no initialization routine, but must return a dict anyways

Classes   
handlerClass

the handlerClass is where everything happens, it depends on


Table of Contents

This document was automatically generated on Wed Jul 11 15:14:01 2001 by HappyDoc version r1_5