Show / Hide Table of Contents

Class SoMessageListener

Message listener used for listening to SuperOffice messages.

Inheritance
Object
SoMessageListener
Implements
IDisposable
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.Messaging
Assembly: SoDataBase.dll
Syntax
public class SoMessageListener : IDisposable

Constructors

SoMessageListener(IPEndPoint, Boolean, SoMessageRecieved)

Initialize a new message listener.

Declaration
public SoMessageListener(IPEndPoint endPoint, bool scanForPort, SoMessageRecieved onSoMessageRecieved)
Parameters
Type Name Description
IPEndPoint endPoint

End point to listen for messages on.

Boolean scanForPort

True if the message listener should scan for an available port to listen on.

SoMessageRecieved onSoMessageRecieved

Call-back called when messages are recieved.

Properties

EndPoint

End point the message listener is listening on.

Declaration
public IPEndPoint EndPoint { get; }
Property Value
Type Description
IPEndPoint

State

State of the message listener.

Declaration
public SoMessageListener.ListeningState State { get; set; }
Property Value
Type Description
SoMessageListener.ListeningState

Methods

BindToSocket(ref IPEndPoint, Boolean)

Bind to socket using IPv4 UDP Data Gram.

Declaration
public static Socket BindToSocket(ref IPEndPoint endPoint, bool scanForPort)
Parameters
Type Name Description
IPEndPoint endPoint

End point associated with the socket

Boolean scanForPort

True to scan for availaple ports in higher ranges

Returns
Type Description
Socket

Socket bound to the provided port

Dispose()

Dispose the message listener.

Declaration
public void Dispose()

Start()

Start the message listener.

Declaration
protected virtual void Start()

Stop()

Stop the message listener.

Declaration
protected virtual void Stop()

StopAllListeners()

Stop all message listeners within the process.

Declaration
public static void StopAllListeners()

Implements

IDisposable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top