Class MpxBinding
Provides asynchronous communicating pattern based on asynchronous virtual socket.
The concrete socket may be based on OS-supported technology i.e. - IO completion ports on Windows
Inheritance
System.Object
MpxBinding
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.dll
Syntax
public sealed class MpxBinding : Binding, IDisposable, IDaemon, IDaemonView, IApplicationComponent, INamed, IConfigurable, ILocalizedTimeProvider, IInstrumentable, IExternallyParameterized
Constructors
MpxBinding(IGlueImplementation, String, Provider)
Declaration
public MpxBinding(IGlueImplementation glue, string name = null, Provider provider = null)
Parameters
Fields
CONFIG_SOCKET_FACTORY_SECT
Declaration
public const string CONFIG_SOCKET_FACTORY_SECT = "socket-factory"
Field Value
Type |
Description |
System.String |
|
DEFAULT_IDLE_CHUNK_LIFE_SEC
Declaration
public const int DEFAULT_IDLE_CHUNK_LIFE_SEC = 600
Field Value
Type |
Description |
System.Int32 |
|
DEFAULT_MAX_CHUNK_POOL_COUNT
Declaration
public const int DEFAULT_MAX_CHUNK_POOL_COUNT = 1024
Field Value
Type |
Description |
System.Int32 |
|
DEFAULT_PORT
Declaration
public const int DEFAULT_PORT = 8237
Field Value
Type |
Description |
System.Int32 |
|
DEFAULT_RCV_TIMEOUT
Declaration
public const int DEFAULT_RCV_TIMEOUT = 0
Field Value
Type |
Description |
System.Int32 |
|
DEFAULT_SND_TIMEOUT
Declaration
public const int DEFAULT_SND_TIMEOUT = 0
Field Value
Type |
Description |
System.Int32 |
|
DEFAULT_SOCKET_LINGER_SEC
Declaration
public const int DEFAULT_SOCKET_LINGER_SEC = 3
Field Value
Type |
Description |
System.Int32 |
|
Properties
ClientReceiveBufferSize
Declaration
[Config("client-transport/$rcv-buf-size", 16384)]
public int ClientReceiveBufferSize { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ClientReceiveTimeout
Declaration
[Config("client-transport/$rcv-timeout", 0)]
public int ClientReceiveTimeout { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ClientSendBufferSize
Declaration
[Config("client-transport/$snd-buf-size", 16384)]
public int ClientSendBufferSize { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ClientSendTimeout
Declaration
[Config("client-transport/$snd-timeout", 0)]
public int ClientSendTimeout { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public override string EncodingFormat { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
IdleChunkLifeSec
Specifies the maximum length of life of an unused memory chunk in the pool.
The idle chunk will be evicted after this interval.
This setting is common for both server and client as they share the same pool
Declaration
[Config(null, 600)]
public int IdleChunkLifeSec { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
MaxChunkPoolCount
Imposes a limit on how many memory chunks can be stored in free chunk pool.
The chunks can be reused for making new connections.
This setting is common for both server and client as they share the same pool
Declaration
[Config(null, 1024)]
public int MaxChunkPoolCount { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
MaxMsgSize
Imposes a limit on maximum message size in bytes
Declaration
[Config("$max-msg-size", 524288)]
public int MaxMsgSize { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
OperationFlow
Mpx binding is always async by definition
Declaration
public override OperationFlow OperationFlow { get; }
Property Value
Overrides
ServerReceiveBufferSize
Declaration
[Config("server-transport/$rcv-buf-size", 16384)]
public int ServerReceiveBufferSize { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ServerReceiveTimeout
Declaration
[Config("server-transport/$rcv-timeout", 0)]
public int ServerReceiveTimeout { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ServerSendBufferSize
Declaration
[Config("server-transport/$snd-buf-size", 16384)]
public int ServerSendBufferSize { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ServerSendTimeout
Declaration
[Config("server-transport/$snd-timeout", 0)]
public int ServerSendTimeout { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
SocketFactory
Returns factory used to make new socket instances per particular technology
Declaration
public MpxSocketFactory SocketFactory { get; }
Property Value
SocketLingerSec
Sets socket linger options.
This setting is common for both server and client as they have the same channel semantics
Declaration
[Config(null, 3)]
public int SocketLingerSec { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
AreNodesIdentical(Node, Node)
Declaration
public override bool AreNodesIdentical(Node left, Node right)
Parameters
Type |
Name |
Description |
Node |
left |
|
Node |
right |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
CloseServerEndpoint(ServerEndPoint)
Declaration
protected override void CloseServerEndpoint(ServerEndPoint epoint)
Parameters
Overrides
DoAcceptManagerVisit(Object, DateTime)
Declaration
protected override void DoAcceptManagerVisit(object manager, DateTime managerNow)
Parameters
Type |
Name |
Description |
System.Object |
manager |
|
System.DateTime |
managerNow |
|
Overrides
Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Overrides
DoStart()
Declaration
protected override void DoStart()
Overrides
DoWaitForCompleteStop()
Declaration
protected override void DoWaitForCompleteStop()
Overrides
MakeNewClientTransport(ClientEndPoint)
Declaration
protected override ClientTransport MakeNewClientTransport(ClientEndPoint client)
Parameters
Returns
Overrides
OpenServerEndpoint(ServerEndPoint)
Declaration
protected override ServerTransport OpenServerEndpoint(ServerEndPoint epoint)
Parameters
Returns
Overrides
Implements
System.IDisposable
Extension Methods