thrift.protocol.binary

class TBinaryProtocol(Transport = TTransport) : TProtocol [final]
TProtocol implementation of the Binary Thrift protocol.
this(Transport trans, int containerSizeLimit = 0, int stringSizeLimit = 0, bool strictRead = false, bool strictWrite = true)
Constructs a new instance.

Parameters:

transThe transport to use.
containerSizeLimitIf positive, the container size is limited to the given number of items.
stringSizeLimitIf positive, the string length is limited to the given number of bytes.
strictReadIf false, old peers which do not include the protocol version are tolerated.
strictWriteWhether to include the protocol version in the header.
bool strictRead
If false, old peers which do not include the protocol version in the message header are tolerated.
Defaults to false.
bool strictWrite
Whether to include the protocol version in the message header (older versions didn't).
Defaults to true.
int containerSizeLimit
If positive, limits the number of items of deserialized containers to the given amount.
This is useful to avoid allocating excessive amounts of memory when broken data is received. If the limit is exceeded, a SIZE_LIMIT-type TProtocolException is thrown.

Defaults to zero (no limit).
int stringSizeLimit
If positive, limits the length of deserialized strings/binary data to the given number of bytes.
This is useful to avoid allocating excessive amounts of memory when broken data is received. If the limit is exceeded, a SIZE_LIMIT-type TProtocolException is thrown.

Defaults to zero (no limit).
TBinaryProtocol!Transport tBinaryProtocol(Transport)(Transport trans, int containerSizeLimit = 0, int stringSizeLimit = 0, bool strictRead = false, bool strictWrite = true)
TBinaryProtocol construction helper to avoid having to explicitly specify the transport type, i.e. to allow the constructor being called using IFTI (see D Bugzilla enhancement requet 6082).
class TBinaryProtocolFactory(Transports...) : TProtocolFactory
TProtocolFactory creating a TBinaryProtocol instance for passed in transports.
The optional Transports template tuple parameter can be used to specify one or more TTransport implementations to specifically instantiate TBinaryProtocol for. If the actual transport types encountered at runtime match one of the transports in the list, a specialized protocol instance is created. Otherwise, a generic TTransport version is used.
this(int containerSizeLimit = 0, int stringSizeLimit = 0, bool strictRead = false, bool strictWrite = true)