The module boing.net.slip provides methods and classes for
supporting the SLIP protocol encoding and decoding.
-
boing.net.slip.encode(data)
Return a slip encoded version of data.
-
boing.net.slip.decode(data, previous=None)
Return the list of bytearrays obtained from the slip decoding
of data followed by the undecoded bytes. If previous is not
None, data is appended to previous before decoding.
A typical usage would be:
buffer = bytearray()
decoded, buffer = decode(data, buffer)
-
class boing.net.slip.Encoder
The Encoder is able to produce slip encoded version of byte strings.
-
encode(obj)
Return a slip encoded version of the byte string obj.
-
reset()
NOP method.
-
class boing.net.slip.Decoder
The Decoder object is able to decode slip encoded byte strings
into the their internal components.
-
decode(obj)
Return the list of bytearrays obtained from the slip
decoding of obj.
-
reset()
Reset the slip internal buffer.