Class SIPConnection
Class for managing a SIP connection.
Inherited Members
Namespace: SipLib.Channels
Assembly: SipLib.dll
Syntax
public class SIPConnection
Constructors
| Edit this page View SourceSIPConnection(SIPChannel, TcpClient, Stream, IPEndPoint, SIPProtocolsEnum, SIPConnectionsEnum)
Class for managing a bi-directional SIP connection. This class is used by the steam based channel classes (SIPTCPChannel and SIPTLSChannel).
Declaration
public SIPConnection(SIPChannel channel, TcpClient tcpClient, Stream sipStream, IPEndPoint remoteEndPoint, SIPProtocolsEnum connectionProtocol, SIPConnectionsEnum connectionType)
Parameters
Type | Name | Description |
---|---|---|
SIPChannel | channel | Channel that owns this connection |
TcpClient | tcpClient | TcpClient of the channel |
Stream | sipStream | Underlying stream for the connection |
IPEndPoint | remoteEndPoint | Remote IPEndPoint of the connection |
SIPProtocolsEnum | connectionProtocol | Type of transport protocol used by the connection |
SIPConnectionsEnum | connectionType | Either a Listener (server) or a Caller (client) |
Fields
| Edit this page View SourceConnectionProtocol
Connection/transport protocol
Declaration
public SIPProtocolsEnum ConnectionProtocol
Field Value
Type | Description |
---|---|
SIPProtocolsEnum | For example: udp, tcp, tls, ws, wss. |
ConnectionType
Connection type
Declaration
public SIPConnectionsEnum ConnectionType
Field Value
Type | Description |
---|---|
SIPConnectionsEnum | The available connection types are Listener or Caller |
LastTransmission
Contains the time when a SIP packet was last sent or received.
Declaration
public DateTime LastTransmission
Field Value
Type | Description |
---|---|
DateTime |
RemoteEndPoint
Remote endpoint of the connection
Declaration
public IPEndPoint RemoteEndPoint
Field Value
Type | Description |
---|---|
IPEndPoint |
Properties
| Edit this page View SourceLocalEndpoint
Gets the IPEndpoint that this connection object is listening on.
Declaration
public IPEndPoint? LocalEndpoint { get; }
Property Value
Type | Description |
---|---|
IPEndPoint |
Events
| Edit this page View SourceSIPMessageReceived
Fired when a complete SIP message is received
Declaration
public event SIPMessageReceivedDelegate? SIPMessageReceived
Event Type
Type | Description |
---|---|
SIPMessageReceivedDelegate |
SIPSocketDisconnected
Fired when the SIP socket gets disconnected
Declaration
public event SIPConnectionDisconnectedDelegate? SIPSocketDisconnected
Event Type
Type | Description |
---|---|
SIPConnectionDisconnectedDelegate |