Module bzMessage :: Class ClientsMessages
[frames] | no frames]

Class ClientsMessages

source code


Chat messages from other client.

Message is sent when a player says something. 'BB%ds'

Instance Methods
 
__init__(self, messages=[]) source code
Byte Array. 'BB'+'B%ds' * NbClients
Encode(self, messages=[])
Returns: the encoded data
source code
list of tuples (Integer,String)
Decode(self, data)
Returns: playerMessages[] list of [idfrom, message]
source code
 
__repr__(self) source code
Method Details

__init__(self, messages=[])
(Constructor)

source code 
Overrides: ServerMessage.__init__

Encode(self, messages=[])

source code 
Parameters:
  • messages (list of String) - list of messages [idfrom(Integer), message(String)]
Returns: Byte Array. 'BB'+'B%ds' * NbClients
the encoded data

Decode(self, data)

source code 
Parameters:
  • data (Byte Array. 'BB' + '%ds' * NbMessages) - the data to decode.
Returns: list of tuples (Integer,String)
playerMessages[] list of [idfrom, message]

__repr__(self)
(Representation operator)

source code 
Overrides: ServerMessage.__repr__