Package lacewing :: Module client :: Class Peer
[frames] | no frames]

Class Peer

source code

object --+
         |
        Peer

Represents a remote client.

Instance Methods
 
__init__(self, name, id, master, channel)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
sendMessage(self, message, subchannel, typeName=None, asObject=False, asDatagram=False)
Send a message to another peer
source code
 
kick(self, peer) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  user = None
hash(x)
Instance Variables
  name = None
The name of the client.
  id = None
The ID of the client
  master = False
True if this peer is the master of the channel
Properties

Inherited from object: __class__

Method Details

__init__(self, name, id, master, channel)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

sendMessage(self, message, subchannel, typeName=None, asObject=False, asDatagram=False)

source code 

Send a message to another peer

Parameters:
  • subchannel - The subchannel of the message in the range 0-256
  • typeName - If not specified, the type will be automatically detected (see lacewing.packetloaders.common.DATA_TYPES for possible values)
  • message (str/number/ByteReader)