Show / Hide Table of Contents

Class SIPTLSChannel

Inheritance
System.Object
SIPChannel
SIPTCPChannel
SIPTLSChannel
Implements
System.IDisposable
Inherited Members
SIPTCPChannel.m_channelSocket
SIPTCPChannel.m_connectingSockets
SIPTCPChannel.DisableLocalTCPSocketsCheck
SIPTCPChannel.SendAsync(SIPEndPoint, Byte[], Boolean, String)
SIPTCPChannel.SendSecureAsync(SIPEndPoint, Byte[], String, Boolean, String)
SIPTCPChannel.OnSIPStreamDisconnected(SIPStreamConnection, SocketError)
SIPTCPChannel.SIPTCPMessageReceived(SIPChannel, SIPEndPoint, SIPEndPoint, Byte[])
SIPTCPChannel.HasConnection(String)
SIPTCPChannel.HasConnection(SIPEndPoint)
SIPTCPChannel.HasConnection(Uri)
SIPTCPChannel.IsAddressFamilySupported(AddressFamily)
SIPTCPChannel.Close()
SIPTCPChannel.Dispose()
SIPChannel.logger
SIPChannel.ID
SIPChannel.LocalIPAddresses
SIPChannel.InternetDefaultAddress
SIPChannel.ListeningIPAddress
SIPChannel.Port
SIPChannel.ListeningEndPoint
SIPChannel.ListeningSIPEndPoint
SIPChannel.IsReliable
SIPChannel.IsSecure
SIPChannel.SIPProtocol
SIPChannel.Closed
SIPChannel.SIPMessageReceived
SIPChannel.SIPEncoding
SIPChannel.SIPBodyEncoding
SIPChannel.GetLocalIPAddressForDestination(IPAddress)
SIPChannel.GetContactURI(SIPSchemesEnum, SIPEndPoint)
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)
System.Object.ToString()
Namespace: SIPSorcery.SIP
Assembly: SIPSorcery.dll
Syntax
public class SIPTLSChannel : SIPTCPChannel, IDisposable

Constructors

| Improve this Doc View Source

SIPTLSChannel(IPEndPoint, Boolean, RemoteCertificateValidationCallback)

Declaration
public SIPTLSChannel(IPEndPoint endPoint, bool useDualMode = false, RemoteCertificateValidationCallback remoteCertificateValidation = null)
Parameters
Type Name Description
System.Net.IPEndPoint endPoint
System.Boolean useDualMode
System.Net.Security.RemoteCertificateValidationCallback remoteCertificateValidation
| Improve this Doc View Source

SIPTLSChannel(X509Certificate2, IPAddress, Int32)

Declaration
public SIPTLSChannel(X509Certificate2 serverCertificate, IPAddress listenAddress, int listenPort)
Parameters
Type Name Description
System.Security.Cryptography.X509Certificates.X509Certificate2 serverCertificate
System.Net.IPAddress listenAddress
System.Int32 listenPort
| Improve this Doc View Source

SIPTLSChannel(X509Certificate2, IPEndPoint, Boolean, X509Certificate2Collection, RemoteCertificateValidationCallback)

Declaration
public SIPTLSChannel(X509Certificate2 serverCertificate, IPEndPoint endPoint, bool useDualMode = false, X509Certificate2Collection clientCertificates = null, RemoteCertificateValidationCallback remoteCertificateValidation = null)
Parameters
Type Name Description
System.Security.Cryptography.X509Certificates.X509Certificate2 serverCertificate
System.Net.IPEndPoint endPoint
System.Boolean useDualMode
System.Security.Cryptography.X509Certificates.X509Certificate2Collection clientCertificates
System.Net.Security.RemoteCertificateValidationCallback remoteCertificateValidation

Properties

| Improve this Doc View Source

BypassCertificateValidation

Allows to ignore any ssl policy errors regarding the received certificate. Only applicable when no custom remote certificate validation is provided.

Declaration
public bool BypassCertificateValidation { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

ProtDescr

Declaration
protected override string ProtDescr { get; }
Property Value
Type Description
System.String
Overrides
SIPTCPChannel.ProtDescr

Methods

| Improve this Doc View Source

IsProtocolSupported(SIPProtocolsEnum)

Checks whether the specified protocol is supported.

Declaration
public override bool IsProtocolSupported(SIPProtocolsEnum protocol)
Parameters
Type Name Description
SIPProtocolsEnum protocol

The protocol to check.

Returns
Type Description
System.Boolean

True if supported, false if not.

Overrides
SIPTCPChannel.IsProtocolSupported(SIPProtocolsEnum)
| Improve this Doc View Source

OnAccept(SIPStreamConnection)

For the TLS channel the SSL stream must be created and any authentication actions undertaken.

Declaration
protected override void OnAccept(SIPStreamConnection streamConnection)
Parameters
Type Name Description
SIPStreamConnection streamConnection

The stream connection holding the newly accepted client socket.

Overrides
SIPTCPChannel.OnAccept(SIPStreamConnection)
| Improve this Doc View Source

OnAcceptAsync(SIPStreamConnection)

For the TLS channel the SSL stream must be created and any authentication actions undertaken.

Declaration
protected async Task OnAcceptAsync(SIPStreamConnection streamConnection)
Parameters
Type Name Description
SIPStreamConnection streamConnection

The stream connection holding the newly accepted client socket.

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

OnClientConnect(SIPStreamConnection, String)

For the TLS channel once the TCP client socket is connected it needs to be wrapped up in an SSL stream.

Declaration
protected override async Task<SocketError> OnClientConnect(SIPStreamConnection streamConnection, string serverCertificateName)
Parameters
Type Name Description
SIPStreamConnection streamConnection

The stream connection holding the newly connected client socket.

System.String serverCertificateName

The expected common name on the SSL certificate supplied by the server.

Returns
Type Description
System.Threading.Tasks.Task<System.Net.Sockets.SocketError>
Overrides
SIPTCPChannel.OnClientConnect(SIPStreamConnection, String)
| Improve this Doc View Source

SendOnConnected(SIPStreamConnection, Byte[])

Sends data using the connected SSL stream.

Declaration
protected override Task SendOnConnected(SIPStreamConnection sipStreamConn, byte[] buffer)
Parameters
Type Name Description
SIPStreamConnection sipStreamConn

The stream connection object that holds the SSL stream.

System.Byte[] buffer

The data to send.

Returns
Type Description
System.Threading.Tasks.Task
Overrides
SIPTCPChannel.SendOnConnected(SIPStreamConnection, Byte[])

Implements

System.IDisposable

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX