Struct WireFrame
This struct defines a frame transmitted as a part of WireMsg
which can be used for transport or session management needs
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.dll
Syntax
Constructors
WireFrame(FrameType, Int32, Boolean, FID, String)
Declaration
public WireFrame(FrameType type, int format, bool oneWay, FID reqID, string headersContent = null)
Parameters
Type |
Name |
Description |
FrameType |
type |
|
System.Int32 |
format |
|
System.Boolean |
oneWay |
|
FID |
reqID |
|
System.String |
headersContent |
|
WireFrame(Int32, Boolean, FID, String)
Declaration
public WireFrame(int format, bool oneWay, FID reqID, string headersContent = null)
Parameters
Type |
Name |
Description |
System.Int32 |
format |
|
System.Boolean |
oneWay |
|
FID |
reqID |
|
System.String |
headersContent |
|
WireFrame(Stream)
Reconstruct (deserializes) frame from the stream. May throw on error
Declaration
public WireFrame(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
Fields
FID_LENGTH
Declaration
public const byte FID_LENGTH = 8
Field Value
Type |
Description |
System.Byte |
|
FRAME_LENGTH
Declaration
public const byte FRAME_LENGTH = 21
Field Value
Type |
Description |
System.Byte |
|
Declaration
public static readonly Encoding HEADERS_ENCODING
Field Value
Type |
Description |
System.Text.Encoding |
|
MAGIC
Declaration
public const ushort MAGIC = 43962
Field Value
Type |
Description |
System.UInt16 |
|
Declaration
public const int MAX_HEADERS_BYTE_LENGTH = 4194304
Field Value
Type |
Description |
System.Int32 |
|
Declaration
public const int SLIM_FORMAT = 1397508429
Field Value
Type |
Description |
System.Int32 |
|
VERSION
Declaration
public const byte VERSION = 1
Field Value
Type |
Description |
System.Byte |
|
Properties
Format used for payload encoding, use FORMAT_SLIM as a default constant
Declaration
public int Format { get; }
Property Value
Type |
Description |
System.Int32 |
|
Optional frame headers parsed from XML HeadersContent
Declaration
public IConfigSectionNode Headers { get; }
Property Value
Optional frame headers content - an unparsed XML string
Declaration
public string HeadersContent { get; }
Property Value
Type |
Description |
System.String |
|
Length
The total byte size of the frame that includes the length of headers (if any)
Declaration
public int Length { get; }
Property Value
Type |
Description |
System.Int32 |
|
OneWay
True if the requesting party does not expect a response
Declaration
public bool OneWay { get; }
Property Value
Type |
Description |
System.Boolean |
|
RequestID
RequestID of the request in following message or echo response message
Declaration
public FID RequestID { get; }
Property Value
Type
Returns type of this frame
Declaration
public FrameType Type { get; }
Property Value
Methods
Serialize(Stream)
Serialize the frame to the given stream returning the byte size of the frame
Declaration
public int Serialize(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
Returns
Type |
Description |
System.Int32 |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
Extension Methods