pokerthproto.transport module¶
The low-level transport functionality for packing/unpacking and enveloping/ developing messages.
-
pokerthproto.transport.
develop
(envelope)[source]¶ Remove the envelope from a message.
Parameters: envelope – PokerTHMessage object that envelops a message Returns: PokerTH message from the envelope
-
pokerthproto.transport.
envelop
(msg)[source]¶ Put a message into an envelope.
Parameters: msg – PokerTH message object Returns: message wrapped in a PokerTHMessage object
-
pokerthproto.transport.
makeSizeBytes
(n)[source]¶ Create a 4 bytes string that encodes the number
n
.Parameters: n – integer Returns: 4 bytes string
-
pokerthproto.transport.
pack
(envelope)[source]¶ Packs/Serializes a PokerTHMessage to a data string.
Parameters: envelope – PokerTHMessage envelope Returns: data as string