Struct WireMsg
Represents a message that is transmitted over the wire:
Inherited Members
Namespace: Azos.Glue.Native
Assembly: Azos.dll
Syntax
public struct WireMsg
Remarks
Wire Msg gets serialized like so: +----+ | +----------------------------------------------+---------+ | +-------+ |Size| | | Frame Content | Hdrs... | | | GlueM | +----+ | +----------------------------------------------+---------+ | +-------+ ^ ----------------------+---------------------------------/ ^ | | | | | +-- Msg data (payload) , i.e. Glue message body | +----------------------------- Transport Frame with optional var length headers +-------------------------------------------------------- Total msg size 4 bytes
Constructors
WireMsg(MemChunk)
Creates WireMsg around pre-filled memory chunk that includes msg size - first 4 bytes
Declaration
public WireMsg(MemChunk data)
Parameters
Type | Name | Description |
---|---|---|
MemChunk | data |
Fields
Data
Returns the data chunk received/sent from/to socket INCLUDING the total size (first 4 bytes BEint32)
Declaration
public readonly MemChunk Data
Field Value
Type | Description |
---|---|
MemChunk |
Properties
Buffer
Returns data byte buffer
Declaration
public byte[] Buffer { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
BufferUsedSize
Returns data byte buffer use count, i.w. the buffer may be physically larger, however only BufferUsedSize must be transmitted
Declaration
public int BufferUsedSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Frame
Returns frame serialized in data
Declaration
public WireFrame Frame { get; }
Property Value
Type | Description |
---|---|
WireFrame |
Methods
UpdateBufferStats()
Update buffers statistics
Declaration
public void UpdateBufferStats()