Streamers

class MultimodalMiddlewareProtocol.util.Streamers.Reader(s=None)

Provides an input stream for deserialization.

Parameters:
  • s – initial data for the reader.
get()

Returns the string used to feed the input stream.

Return type:string
move(p)

Move the access pointer to p.

Parameters:
  • p – integer
read(type)
readByte()
readChar()
readDoubleChar()
readInt()
readLong()
readShort()
readString(size)
readUbyte()
readWideString(size)
reset()
Sets the access pointer to 0.
set(s)

Changes the input stream to s and set the access pointer to 0.

Parameters:
  • s – string
class MultimodalMiddlewareProtocol.util.Streamers.Writer

Provides an output stream for serialization. This class uses a string to hold data in binary format.

add(p)
Concatenates p to the output stream, updating the pointer based on the size of p.
get()

Returns the binary stream.

Return type:binary string
reset()
Initializes the binary stream, deleting its content and setting the position pointer to 0.
writeByte(b)
writeChar(c)
writeDoubleChar(wc)
writeInt(i)
writeLong(l)
writeShort(s)
writeString(s)
writeUbyte(b)
writeWideString(ws)

Previous topic

Hashes

Next topic

UDP Server

This Page

Quick search