Package svs_core :: Package network :: Module packets
[show private | hide private]
[frames | no frames]

Module svs_core.network.packets

Encapsulators for information exchange between clients.

The objects provide network serialisation through the use of the Twisted Perspective Broker system:

http://twistedmatrix.com

Author: Simon Yuill

Contact: simon@lipparosa.org

Copyright: 2005 Simon Yuill

License: GNU GPL version 2 or any later version

Classes
DataPacket Generic data packet.
DataRequest Encapsulates a request for data.
ListenRequest Encapsulates a request for one client to listen to another.
ProfileRequest Encapsulates a request for searching client profiles.

Exceptions
DataPacketException  
ProfileRequestException  

Function Summary
DataPacket makeDataPacket(sender, recipient, content, label, timeToLive)
Factory method to create timestamped data packet.
DataRequest makeDataRequest(sender, recipient, label, args, retrievalAction)
Factory method to produce timestamped data request.
ListenRequest makeListenRequest(sender, recipient, label, action)
Factory method to produce timestamped listener request.
DataPacket makeMessagePacket(sender, messageInput)
Factory method to create DataPacket for chat message.
ListenRequest makeProfileRequest(sender, clientNames, services, methods, commands)
Factory method to produce timestamped profile request.
String __messageInputString(messageInput)
Convert message back into string.
Array __parseMessageInput(messageInput)
Extracts recipients and message from messageInput.

Function Details

makeDataPacket(sender, recipient=None, content=None, label=None, timeToLive=None)

Factory method to create timestamped data packet.
Returns:
DataPacket

makeDataRequest(sender, recipient=None, label=None, args=[], retrievalAction=None)

Factory method to produce timestamped data request.
Returns:
DataRequest

makeListenRequest(sender, recipient=None, label=None, action=None)

Factory method to produce timestamped listener request.
Returns:
ListenRequest

makeMessagePacket(sender, messageInput)

Factory method to create DataPacket for chat message.
Parameters:
messageInput
           (type=Array @raise DataPacketException: if incorrect input.)
Returns:
DataPacket

makeProfileRequest(sender, clientNames=None, services=None, methods=None, commands=None)

Factory method to produce timestamped profile request.

At least one of the search parameters must be speicified, otherwise throws a ProfileRequestException.
Returns:
ListenRequest

__messageInputString(messageInput)

Convert message back into string.
Returns:
String

__parseMessageInput(messageInput)

Extracts recipients and message from messageInput.
Parameters:
messageInput
           (type=Array)
Returns:
Array

Generated by Epydoc 2.1 on Thu Oct 20 15:30:28 2005 http://epydoc.sf.net