Show / Hide Table of Contents

Class ErlMsg

Provides a distributed carrier for Erlang messages

Inheritance
System.Object
ErlMsg
Implements
IQueable
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)
Namespace: NFX.Erlang
Assembly: NFX.Erlang.dll
Syntax
public class ErlMsg : IQueable
Remarks

Instances of this class are created to package header and payload information in received Erlang messages so that the recipient can obtain both parts with a single call to NFX.Erlang.ErlMbox.receiveMsg

The header information that is available is as follows:

  • a tag indicating the type of message
  • the intended recipient of the message, either as a ErlPid or as a ErlAtom, but never both.
  • (sometimes) the sender of the message. Due to some eccentric characteristics of the Erlang distribution protocol, not all messages have information about the sending process. In particular, only messages whose tag is RegSend contain sender information.

Message are sent using the Erlang external format (see separate documentation). When a message is received and delivered to the recipient ErlMbox, the body of the message is still in this external representation until Msg is called, at which point the message is decoded. A copy of the decoded message is stored in the OtpMsg so that subsequent calls to Msg do not require that the message be decoded a second time.

Fields

Cookie

Contains cookie if it is to be sent or was received in the message

Declaration
public readonly ErlAtom Cookie
Field Value
Type Description
ErlAtom

Paybuf

The payload of this deserialized message

Declaration
public readonly ErlInputStream Paybuf
Field Value
Type Description
ErlInputStream

Reason

Reason associated with some messages

Declaration
public readonly IErlObject Reason
Field Value
Type Description
IErlObject

Ref

Returns reference contained in this message

Declaration
public readonly ErlRef Ref
Field Value
Type Description
ErlRef

TraceToken

Trace token delivered in the message

Declaration
public readonly ErlTrace TraceToken
Field Value
Type Description
ErlTrace

Type

The type of message

Declaration
public readonly ErlMsg.Tag Type
Field Value
Type Description
ErlMsg.Tag

Properties

HasSender

Returns true if the message has a non-empty sender

Declaration
public bool HasSender { get; }
Property Value
Type Description
System.Boolean

Msg

Deserialized Erlang message contained in this instance

Declaration
public IErlObject Msg { get; }
Property Value
Type Description
IErlObject

Recipient

Get the recipient for this message, as a Pid or a registered name (Atom)

Declaration
public IErlObject Recipient { get; }
Property Value
Type Description
IErlObject

RecipientName

Get the name of the recipient for this message

Declaration
public ErlAtom RecipientName { get; }
Property Value
Type Description
ErlAtom
Remarks

Messages are sent to Pids or names. If this message was sent to a name then the name is returned by this method

RecipientPid

Get the Pid of the recipient for this message, if it is a Send message

Declaration
public ErlPid RecipientPid { get; }
Property Value
Type Description
ErlPid
Remarks

Messages are sent to Pids or names. If this message was sent to a Pid then the Pid is returned by this method. The recipient Pid is also available for link, unlink and exit messages

Sender

Get the sender for this message, as a Pid or a registered name (Atom)

Declaration
public IErlObject Sender { get; }
Property Value
Type Description
IErlObject

SenderName

Declaration
public ErlAtom SenderName { get; }
Property Value
Type Description
ErlAtom

SenderPid

Returns pid of the sender (may be empty, i.e. SenderPid.Empty == true)

Declaration
public ErlPid SenderPid { get; }
Property Value
Type Description
ErlPid

Methods

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Implements

IQueable

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