Developer Documentation
Our new developer documentation is now available. Please check it out!

MsgPackWriter

public class MsgPackWriter : IMsgPackWriter, IDisposable

Rudimentary Msgpack implementation that will be used for sending RPC to the server.

Constructors

NameDescription
MsgPackWriter()Create Writer
MsgPackWriter(Encoding, Boolean)Create Writer

Static Methods

NameDescription
CreateCreate writer with a prefilled stream buffer
WriteByteAppend value with MsgPackToken token to bytes
WriteSByteAppend value with MsgPackToken token to bytes
WriteShortAppend value with MsgPackToken token to bytes
WriteUShortAppend value with MsgPackToken token to bytes
WriteIntAppend value with MsgPackToken token to bytes
WriteUIntAppend value with MsgPackToken token to bytes
WriteLongAppend value with MsgPackToken token to bytes
WriteULongAppend value with MsgPackToken token to bytes
WriteFloatAppend value with MsgPackToken token to bytes
WriteDoubleAppend value with MsgPackToken token to bytes
WriteBoolAppend fixedbool with either MsgPackToken to bytes
WriteStringAppend string value with size based token to bytes
WriteBinaryAppend values with size based token to bytes

Properties

NameDescription
EncodingUsed Encoding defaults to UTF8

Public Methods

NameDescription
ClearClear stream buffer
WriteSet MsgPackToken based on the unsigend value size
WriteByteWrite value with token MsgPackToken
WriteSByteWrite value with token MsgPackToken
WriteShortWrite value with token MsgPackToken
WriteUShortWrite value with token MsgPackToken
WriteIntWrite value with token MsgPackToken
WriteUIntWrite value with token MsgPackToken
WriteLongWrite value with token MsgPackToken
WriteULongWrite value with token MsgPackToken
WriteFloatWrite value with token MsgPackToken
WriteDoubleWrite value with token MsgPackToken
WriteBoolWrite fixedbool of either MsgPackToken
WriteStringWrite string with writer encoding (default UTF8)
WriteBinaryMessagePack header is big-endian, value binarywriter default little-endian
WriteArrayHeaderMessagePack header is big-endian, value binarywriter default little-endian
WriteMapHeaderMessagePack header is big-endian value binarywriter default little-endian
GetBytesGet raw bytes from the stream buffer
GetLengthGet raw bytes from the stream buffer
GetBufferGet raw bytes from the underlying stream buffer
AppendAppend bytes to the stream at the currrent stream position
ToStringString representation of the stream based on encoding (default UTF8)
ToHexString representation of the stream in hex
Disposedispose