Show / Hide Table of Contents

Class ErlLocalNode

Inheritance
System.Object
DisposableObject
ApplicationComponent
Service
ErlAbstractNode
ErlLocalNode
Implements
IApplicationComponent
System.IDisposable
IService
IConfigurable
ILocalizedTimeProvider
IApplicationFinishNotifiable
INamed
Inherited Members
ErlAbstractNode.tryReadStringFromFile(String)
ErlAbstractNode.m_Creation
ErlAbstractNode.m_TcpNoDelay
ErlAbstractNode.m_TcpRcvBufSize
ErlAbstractNode.m_TcpSndBufSize
ErlAbstractNode.m_TcpKeepAlive
ErlAbstractNode.m_TcpLinger
ErlAbstractNode.NodeName
ErlAbstractNode.NodeLongName
ErlAbstractNode.Host
ErlAbstractNode.AliveName
ErlAbstractNode.Cookie
ErlAbstractNode.Port
ErlAbstractNode.ToString()
ErlAbstractNode.TcpNoDelay
ErlAbstractNode.TcpSndBufSize
ErlAbstractNode.TcpRcvBufSize
ErlAbstractNode.TcpKeepAlive
ErlAbstractNode.TcpLinger
Service.CONFIG_NAME_ATTR
Service.Destructor()
Service.ApplicationDontAutoStartService
Service.Status
Service.Running
Service.Name
Service.TimeLocation
Service.LocalizedTime
Service.Configure(IConfigSectionNode)
Service.Start()
Service.SignalStop()
Service.CheckForCompleteStop()
Service.WaitForCompleteStop()
Service.AcceptManagerVisit(Object, DateTime)
Service.UniversalTimeToLocalizedTime(DateTime)
Service.LocalizedTimeToUniversalTime(DateTime)
Service.AbortStart()
Service.DoSignalStop()
Service.DoCheckForCompleteStop()
Service.CheckServiceInactive()
Service.CheckServiceActive()
Service.CheckServiceActiveOrStarting()
Service.DoAcceptManagerVisit(Object, DateTime)
Service.____ObtainPrivateServiceStatusLockObject()
ApplicationComponent.AllComponents
ApplicationComponent.GetAppComponentBySID(UInt64)
ApplicationComponent.GetAppComponentByCommonName(String)
ApplicationComponent.ComponentSID
ApplicationComponent.ComponentStartTime
ApplicationComponent.ComponentCommonName
ApplicationComponent.ComponentDirector
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
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)
Namespace: NFX.Erlang
Assembly: NFX.Erlang.dll
Syntax
public class ErlLocalNode : ErlAbstractNode, IApplicationComponent, IDisposable, IService, IConfigurable, ILocalizedTimeProvider, IApplicationFinishNotifiable, INamed

Constructors

ErlLocalNode(String, ErlAtom, Boolean, Boolean)

Create a node with the given name, cookie, and short name indicator

Declaration
public ErlLocalNode(string node, ErlAtom cookie, bool shortName = true, bool acceptConns = true)
Parameters
Type Name Description
System.String node
ErlAtom cookie
System.Boolean shortName
System.Boolean acceptConns

ErlLocalNode(String, Boolean, Boolean)

Create a node with the given name and the default cookie

Declaration
public ErlLocalNode(string node, bool shortName = true, bool acceptConns = true)
Parameters
Type Name Description
System.String node
System.Boolean shortName
System.Boolean acceptConns

Fields

m_OnReadWrite

Delegate invoked on read/write from socket

Declaration
protected ReadWriteEventHandler m_OnReadWrite
Field Value
Type Description
ReadWriteEventHandler

Properties

AcceptConnections

If true local node will start a listener

Declaration
[Config("$accept")]
public bool AcceptConnections { get; set; }
Property Value
Type Description
System.Boolean

AllNodeConfigs

Configs for remote nodes

Declaration
public ConfigSectionNode AllNodeConfigs { get; }
Property Value
Type Description
ConfigSectionNode

Connections

Declaration
public IEnumerator<KeyValuePair<ErlAtom, ErlConnection>> Connections { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<ErlAtom, ErlConnection>>

Creation

Contains node creation bits that facilitate Pid uniqueness upon node restart

Declaration
public byte Creation { get; }
Property Value
Type Description
System.Byte

GroupLeader

Mailbox for handling all I/O directed from remote nodes

Declaration
public ErlMbox GroupLeader { get; }
Property Value
Type Description
ErlMbox

LogUnhandledMsgs

Record unhandled msgs to log

Declaration
[Config]
public bool LogUnhandledMsgs { get; set; }
Property Value
Type Description
System.Boolean

RemoteNodeConfigs

Declaration
public IEnumerable<ConfigSectionNode> RemoteNodeConfigs { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ConfigSectionNode>

TraceLevel

Set the trace level for this connection. Normally tracing is off by default

Declaration
[Config("$trace")]
public ErlTraceLevel TraceLevel { get; set; }
Property Value
Type Description
ErlTraceLevel

TraceToLog

Save trace events to log

Declaration
[Config]
public bool TraceToLog { get; set; }
Property Value
Type Description
System.Boolean

Methods

Add(ErlConnection)

Add a connection to collection

Declaration
public bool Add(ErlConnection conn)
Parameters
Type Name Description
ErlConnection conn
Returns
Type Description
System.Boolean

Returns false if this connection was already previously added

ApplicationFinishAfterCleanup(IApplication)

Declaration
public void ApplicationFinishAfterCleanup(IApplication application)
Parameters
Type Name Description
IApplication application

ApplicationFinishBeforeCleanup(IApplication)

Declaration
public void ApplicationFinishBeforeCleanup(IApplication application)
Parameters
Type Name Description
IApplication application

CloseMbox(ErlMbox)

Close the given mailbox

Declaration
public void CloseMbox(ErlMbox mbox)
Parameters
Type Name Description
ErlMbox mbox

Connection(ErlAtom, Nullable<ErlAtom>)

Declaration
public ErlConnection Connection(ErlAtom toNode, ErlAtom? cookie = default (ErlAtom? ))
Parameters
Type Name Description
ErlAtom toNode
System.Nullable<ErlAtom> cookie
Returns
Type Description
ErlConnection

Connection(String, Nullable<ErlAtom>)

Declaration
public ErlConnection Connection(string node, ErlAtom? cookie = default (ErlAtom? ))
Parameters
Type Name Description
System.String node
System.Nullable<ErlAtom> cookie
Returns
Type Description
ErlConnection

CreateMbox(ErlAtom)

Create a new named mailbox (emulates spawning a new Pid)

Declaration
public ErlMbox CreateMbox(ErlAtom name)
Parameters
Type Name Description
ErlAtom name
Returns
Type Description
ErlMbox

CreateMbox(String)

Create a new named mailbox (emulates spawning a new Pid)

Declaration
public ErlMbox CreateMbox(string name = null)
Parameters
Type Name Description
System.String name
Returns
Type Description
ErlMbox

CreateRef()

Create an Erlang {@link Ref reference}. Erlang references are based upon some node specific information; this method creates a reference using the information in this node. Each call to this method produces a unique reference

Declaration
public ErlRef CreateRef()
Returns
Type Description
ErlRef

Disconnect(String)

Declaration
public bool Disconnect(string fromNode)
Parameters
Type Name Description
System.String fromNode
Returns
Type Description
System.Boolean

DoConfigure(IConfigSectionNode)

Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Type Name Description
IConfigSectionNode node
Overrides
ErlAbstractNode.DoConfigure(IConfigSectionNode)

DoStart()

Start current node. This optionally creates a socket listener and I/O server

Declaration
protected override void DoStart()
Overrides
Service.DoStart()

DoWaitForCompleteStop()

Declaration
protected override void DoWaitForCompleteStop()
Overrides
Service.DoWaitForCompleteStop()

FindMbox(ErlAtom)

Determine the mailbox corresponding to a registered name on this ErlLocalNode

Declaration
public ErlMbox FindMbox(ErlAtom name)
Parameters
Type Name Description
ErlAtom name
Returns
Type Description
ErlMbox

MakeLocalNodeForThisAppOnThisHost()

Makes local node name based on app id and local host name

Declaration
public static string MakeLocalNodeForThisAppOnThisHost()
Returns
Type Description
System.String

OnConnectAttempt(ErlAtom, Direction, Object)

Declaration
protected virtual void OnConnectAttempt(ErlAtom node, Direction dir, object info)
Parameters
Type Name Description
ErlAtom node
Direction dir
System.Object info

OnEpmdFailedConnectAttempt(ErlAtom, Object)

Declaration
protected void OnEpmdFailedConnectAttempt(ErlAtom node, object info)
Parameters
Type Name Description
ErlAtom node
System.Object info

OnIoOutput(ErlAtom, IErlObject)

Declaration
protected virtual void OnIoOutput(ErlAtom encoding, IErlObject output)
Parameters
Type Name Description
ErlAtom encoding
IErlObject output

OnNodeStatusChange(ErlAtom, Boolean, Object)

Declaration
protected virtual void OnNodeStatusChange(ErlAtom node, bool up, object info)
Parameters
Type Name Description
ErlAtom node
System.Boolean up
System.Object info

OnReadWrite(ErlAbstractConnection, Direction, Int32, Int64, Int64)

Declaration
protected virtual void OnReadWrite(ErlAbstractConnection conn, Direction dir, int lastBytes, long totalBytes, long totalMsgs)
Parameters
Type Name Description
ErlAbstractConnection conn
Direction dir
System.Int32 lastBytes
System.Int64 totalBytes
System.Int64 totalMsgs

OnTrace(ErlTraceLevel, Direction, Func<String>, String, Int32)

Declaration
protected virtual void OnTrace(ErlTraceLevel type, Direction dir, Func<string> msgFunc, string file = null, int line = 0)
Parameters
Type Name Description
ErlTraceLevel type
Direction dir
System.Func<System.String> msgFunc
System.String file
System.Int32 line

OnTrace(ErlTraceLevel, Direction, String, String, Int32)

Declaration
protected void OnTrace(ErlTraceLevel type, Direction dir, string msg, string file = null, int line = 0)
Parameters
Type Name Description
ErlTraceLevel type
Direction dir
System.String msg
System.String file
System.Int32 line

OnTraceCore(ErlTraceLevel, Direction, String, String, Int32)

Declaration
protected virtual void OnTraceCore(ErlTraceLevel type, Direction dir, string msg, string file, int line)
Parameters
Type Name Description
ErlTraceLevel type
Direction dir
System.String msg
System.String file
System.Int32 line

OnUnhandledMsg(ErlConnection, ErlMsg, String, Int32)

Declaration
protected virtual void OnUnhandledMsg(ErlConnection conn, ErlMsg msg, string file = null, int line = 0)
Parameters
Type Name Description
ErlConnection conn
ErlMsg msg
System.String file
System.Int32 line

RemoteNodeConfig(String)

Get configuration settings for a given remote node

Declaration
public ConfigSectionNode RemoteNodeConfig(string remoteNodeName)
Parameters
Type Name Description
System.String remoteNodeName
Returns
Type Description
ConfigSectionNode

Remove(ErlConnection)

Remove a connection from collection

Declaration
public void Remove(ErlConnection conn)
Parameters
Type Name Description
ErlConnection conn

RPC(ErlAtom, ErlAtom, ErlAtom, ErlList, Int32)

Declaration
public IErlObject RPC(ErlAtom node, ErlAtom mod, ErlAtom fun, ErlList args, int timeout)
Parameters
Type Name Description
ErlAtom node
ErlAtom mod
ErlAtom fun
ErlList args
System.Int32 timeout
Returns
Type Description
IErlObject

Send(ErlPid, ErlAtom, ErlAtom, IErlObject)

Send a message to a named mailbox on a given remote node

Declaration
public bool Send(ErlPid from, ErlAtom remoteNode, ErlAtom toName, IErlObject msg)
Parameters
Type Name Description
ErlPid from
ErlAtom remoteNode
ErlAtom toName
IErlObject msg
Returns
Type Description
System.Boolean

Send(ErlPid, ErlAtom, IErlObject)

Send a message to a named mailbox on local node

Declaration
public bool Send(ErlPid from, ErlAtom toName, IErlObject msg)
Parameters
Type Name Description
ErlPid from
ErlAtom toName
IErlObject msg
Returns
Type Description
System.Boolean

Send(ErlPid, IErlObject)

Send a message to a remote ErlPid, representing either another ErlMbox or an Erlang process

Declaration
public bool Send(ErlPid to, IErlObject msg)
Parameters
Type Name Description
ErlPid to
IErlObject msg
Returns
Type Description
System.Boolean

true if message was sent successfully

WaitAny(ErlMbox[])

Declaration
public int WaitAny(params ErlMbox[] mboxes)
Parameters
Type Name Description
ErlMbox[] mboxes
Returns
Type Description
System.Int32

WaitAny(ErlMbox[], Int32)

Wait for arrival of messages in any one of the given mailboxes

Declaration
public int WaitAny(ErlMbox[] mboxes, int msecTimeout = -1)
Parameters
Type Name Description
ErlMbox[] mboxes

Mailboxes to wait for messages in

System.Int32 msecTimeout

Timeout in milliseconds

Returns
Type Description
System.Int32

Index of the first non-empty mailbox or -1 on timeout

WaitAny(IEnumerable<ErlMbox>, Int32)

Declaration
public int WaitAny(IEnumerable<ErlMbox> mboxes, int msecTimeout = -1)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ErlMbox> mboxes
System.Int32 msecTimeout
Returns
Type Description
System.Int32

WaitAny(Int32, ErlMbox[])

Declaration
public int WaitAny(int msecTimeout, params ErlMbox[] mboxes)
Parameters
Type Name Description
System.Int32 msecTimeout
ErlMbox[] mboxes
Returns
Type Description
System.Int32

Events

ConnectAttempt

Declaration
public event ConnAttemptEventHandler ConnectAttempt
Event Type
Type Description
ConnAttemptEventHandler

EpmdFailedConnectAttempt

Declaration
public event EpmdFailedConnAttemptEventHandler EpmdFailedConnectAttempt
Event Type
Type Description
EpmdFailedConnAttemptEventHandler

IoOutput

Declaration
public event IoOutputEventHandler IoOutput
Event Type
Type Description
IoOutputEventHandler

NodeStatusChange

Declaration
public event NodeStatusChangeEventHandler NodeStatusChange
Event Type
Type Description
NodeStatusChangeEventHandler

ReadWrite

Declaration
public event ReadWriteEventHandler ReadWrite
Event Type
Type Description
ReadWriteEventHandler

Trace

Trace callback executed if connection tracing is enabled

Declaration
public event TraceEventHandler Trace
Event Type
Type Description
TraceEventHandler

UnhandledMsg

Declaration
public event UnhandledMsgEventHandler UnhandledMsg
Event Type
Type Description
UnhandledMsgEventHandler

Implements

IApplicationComponent
System.IDisposable
IService
IConfigurable
ILocalizedTimeProvider
IApplicationFinishNotifiable
INamed

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX