TROBinMessage
From RemObjects Software
This is a RemObjects SDK Architecture entry
Feel free to add your notes to this topic below.
Overview
TROBinMessage implements message encoding for the efficient and proprietary BinMessage message format.
BinMessage provides the best performance of all the provided message formats, resulting in very small data packets that can be read and written with little processing overhead. It also supports compression to decrease the wire size of large messages.
File
- uROBinMessage
Declaration
TROBinMessage = class(TROMessage, IROBinMessage, IROStreamAccess);
Hierarchy
- TROComponent
- TROMessage
- TROBinMessage
- TROMessage
Properties
| | | |
|---|---|---|
| CompressionBufferSize | integer | Size of the buffer used for compression (default is 256 kilobytes).
Increasing the buffer increases compression performance for large messages, but it also increases memory footprint. Best performance is reached with a buffer that's large enough for the maximum expected message size. |
| MinSizeForCompression | integer | Minimum size for a message before compression is applied (default is 4096 bytes). Messages below this threshold are sent uncompressed, as the overhead of compressing and decompressing the data would likely outweigh the gain of having only slightly smaller packet on the network. |
| UseCompression | boolean | Toggles whether outgoing messages will be automatically compressed using ZLib if they exceed a specific size. |
Events
| | |
|---|---|
| OnCompress | Fired after the message is compressed.
Use this event to keep track of compression, and possibly to run statistics on compression ratios and dynamically adjust theUseCompression and MinSizeForCompression properties. |
| OnDecompress | Fired after a compressed message has been decompressed.
Use this event to keep track of decompression, and possibly to run statistics on compression ratios and dynamically adjust the UseCompression and MinSizeForCompression properties. |
See Also
Product: RemObjects SDK
Current version: RemObjects SDK 'Vinci' (5.0)
Lists — Glossary — Features — How To — Components — Tools — Samples — Articles — Architecture — Issues
Categories: Text | RemObjects SDK | Architecture | Class | Delphi
