Class SmppClientBase
Base class that provides common members for SmppClient and SmppServerClient
public abstract class SmppClientBase : IDisposable
- Inheritance
-
SmppClientBase
- Implements
- Derived
- Inherited Members
Constructors
SmppClientBase()
Initializes a new instance of the object class.
protected SmppClientBase()
Properties
ConnectionTimeout
Gets or sets the time to wait while trying to establish a connection before terminating the attempt
public TimeSpan ConnectionTimeout { get; set; }
Property Value
EncodingMapper
Gets or sets encoding mapper that manage relation between SMPP Data Coding and .NET Encoding
public EncodingMapper EncodingMapper { get; set; }
Property Value
EnquireLinkInterval
Specifies a period of time when SMPP session status will be checked with EnquireLink command.
public TimeSpan EnquireLinkInterval { get; set; }
Property Value
EsmeAddress
The ESME address range. In Address property can be specified a single SME address or a range of SME addresses using UNIX Regular Expression notation.
public SmeAddress EsmeAddress { get; set; }
Property Value
InterfaceVersion
Indicates the version of the SMPP protocol supported by the ESME.
public byte InterfaceVersion { get; set; }
Property Value
LocalEndPoint
Gets or sets the local end point.
public IPEndPoint LocalEndPoint { get; set; }
Property Value
- IPEndPoint
The local end point.
Logger
public ILog Logger { get; set; }
Property Value
Metrics
Gets metrics for sent and received PDUs.
public ISmppClientMetrics Metrics { get; }
Property Value
Name
Name of the client. Used for logging.
public string Name { get; set; }
Property Value
Queue
Returns internal queue state for sent and received PDUs.
[Obsolete("Use Metrics property instead.")]
public QueueState Queue { get; }
Property Value
ReceiveBufferSize
Gets or sets a value that specifies the size of the receive buffer of the Socket.
public int ReceiveBufferSize { get; set; }
Property Value
Exceptions
- SocketException
An error occurred when attempting to access the socket.
- ObjectDisposedException
The Socket has been closed.
- ArgumentOutOfRangeException
The value specified for a set operation is less than 0.
ReceiveSpeedLimit
Specifies a number of messages per second that can be received from remote side. Default is NoLimit, that means unlimited number of messages.
public LimitRate ReceiveSpeedLimit { get; set; }
Property Value
ReceivedRequestQueueLimit
Specifies a maximum number of SMPP requests in receive queue. Default is 0 which means not limited.
public int ReceivedRequestQueueLimit { get; set; }
Property Value
RemoteEndPoint
Gets the remote end point.
public EndPoint RemoteEndPoint { get; }
Property Value
- EndPoint
The remote end point.
ResponseTimeout
Get or sets the time in milliseconds to wait for Response PDU
public TimeSpan ResponseTimeout { get; set; }
Property Value
SendBufferSize
Gets or sets a value that specifies the size of the send buffer of the Socket.
public int SendBufferSize { get; set; }
Property Value
Exceptions
- SocketException
An error occurred when attempting to access the socket.
- ObjectDisposedException
The Socket has been closed.
- ArgumentOutOfRangeException
The value specified for a set operation is less than 0.
SendQueueLimit
Limits the number of sending SMPP messages to remote side. Default is 0 which means not limited.
public int SendQueueLimit { get; set; }
Property Value
SendSpeedLimit
Specifies a number of messages per time unit that client sends to the server . Default is NoLimit, that means unlimited number of messages.
public LimitRate SendSpeedLimit { get; set; }
Property Value
SequenceGenerator
Gets or sets sequence number generator for correlation purposes in SMPP protocol.
public ISequenceGenerator SequenceGenerator { get; set; }
Property Value
Status
Client connection status
public ConnectionStatus Status { get; protected set; }
Property Value
SystemID
Gets ID of the client
public string SystemID { get; protected set; }
Property Value
SystemType
Identifies the type requesting to bind with the SMSC.
public string SystemType { get; set; }
Property Value
WorkerThreads
Specifies a number of worker threads that process received messages. Default is 3.
public int WorkerThreads { get; set; }
Property Value
Methods
Disconnect()
[Obsolete("Use the same method with Async suffix. This method name will be used in version 3.0 for synchronous processing.")]
public virtual Task Disconnect()
Returns
DisconnectAsync()
Disconnects client from remote endpoint
public virtual Task DisconnectAsync()
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
EnquireLink()
[Obsolete("Use the same method with Async suffix. This method name will be used in version 3.0 for synchronous processing.")]
public Task<EnquireLinkResp> EnquireLink()
Returns
EnquireLink(EnquireLink)
[Obsolete("Use the same method with Async suffix. This method name will be used in version 3.0 for synchronous processing.")]
public Task<EnquireLinkResp> EnquireLink(EnquireLink pdu)
Parameters
pdu
EnquireLink
Returns
EnquireLinkAsync()
Check of the communication path between an ESME and an SMSC.
public Task<EnquireLinkResp> EnquireLinkAsync()
Returns
EnquireLinkAsync(EnquireLink)
Check of the communication path between an ESME and an SMSC.
public Task<EnquireLinkResp> EnquireLinkAsync(EnquireLink pdu)
Parameters
pdu
EnquireLink
Returns
Exceptions
- InvalidOperationException
Thrown when PDU serialization is failed.
- ArgumentNullException
Thrown when request instance is null.
OnPduReceiving(SmppPDU)
protected void OnPduReceiving(SmppPDU pdu)
Parameters
pdu
SmppPDU
OnPduSending(SmppPDU)
protected void OnPduSending(SmppPDU pdu)
Parameters
pdu
SmppPDU
SubmitData(IDataSmBuilder)
[Obsolete("Use the same method with Async suffix. This method name will be used in version 3.0 for synchronous processing.")]
public Task<DataSmResp[]> SubmitData(IDataSmBuilder builder)
Parameters
builder
IDataSmBuilder
Returns
- Task<DataSmResp[]>
SubmitData(DataSm)
[Obsolete("Use the same method with Async suffix. This method name will be used in version 3.0 for synchronous processing.")]
public Task<DataSmResp> SubmitData(DataSm data)
Parameters
data
DataSm
Returns
SubmitData(params DataSm[])
[Obsolete("Use the same method with Async suffix. This method name will be used in version 3.0 for synchronous processing.")]
public Task<DataSmResp[]> SubmitData(params DataSm[] pduList)
Parameters
pduList
DataSm[]
Returns
- Task<DataSmResp[]>
SubmitDataAsync(IDataSmBuilder)
Creates and sends several DATA_SM messages
public Task<DataSmResp[]> SubmitDataAsync(IDataSmBuilder builder)
Parameters
builder
IDataSmBuilder
Returns
- Task<DataSmResp[]>
SubmitDataAsync(DataSm)
Sends DATA_SM message
public Task<DataSmResp> SubmitDataAsync(DataSm data)
Parameters
data
DataSm
Returns
Exceptions
- InvalidOperationException
Thrown when PDU serialization is failed.
- ArgumentNullException
Thrown when request instance is null.
SubmitDataAsync(params DataSm[])
Sends several DATA_SM message
public Task<DataSmResp[]> SubmitDataAsync(params DataSm[] pduList)
Parameters
pduList
DataSm[]
Returns
- Task<DataSmResp[]>
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
UnBind()
[Obsolete("Use the same method with Async suffix. This method name will be used in version 3.0 for synchronous processing.")]
public Task<UnBindResp> UnBind()
Returns
UnbindAsync()
Unregister client from SMSC
public Task<UnBindResp> UnbindAsync()
Returns
Exceptions
- InvalidOperationException
Thrown when PDU serialization is failed.
- ArgumentNullException
Thrown when request instance is null.
Events
evConnected
Occurs when ESME connected to SMSC
public event ConnectedEventHandler evConnected
Event Type
evDataSm
Occurs when receiving DataSm PDU
public event DataSmEventHandler evDataSm
Event Type
evDisconnected
Occurs when client disconnects
public event DisconnectedEventHandler evDisconnected
Event Type
evEnquireLink
Occurs when received EnquireLink PDU
public event EnquireLinkEventHandler evEnquireLink
Event Type
evPduReceiving
Occurs before processing PDU received from remote endpoint
public event PduEventHandler evPduReceiving
Event Type
evPduSending
Occurs before sending PDU to remote endpoint
public event PduEventHandler evPduSending
Event Type
evUnBind
Occurs when Unbind packet received from SMSC
public event UnBindEventHandler evUnBind