C# Class SipSharp.Transports.TransportLayer

Responsible of transporting messages to/from end points.

The transport manager inspects messages to be able to determine where they should be send. It will then serialize the message and send it using the appropiate protocol. It will automatically create a new socket if no socket exists to the destination.

The manager will switch protocol from UDP to TCP if the max UDP packet size is exceeded.

Incoming messages are handled by the MessageFactory. Hook its events to be able to handle them.

Inheritance: ITransportLayer
Afficher le fichier Open project: jgauffin/SipSharp Class Usage Examples

Méthodes publiques

Méthode Description
Register ( ITransport transport ) : void

Register a new transport implementation.

Send ( IRequest request ) : void
Send ( IResponse response ) : void
Start ( ) : void

Start layer.

TransportLayer ( MessageFactory messageFactory ) : System

Initializes a new instance of the TransportLayer class.

Méthodes protégées

Méthode Description
CreateEndPoint ( IRequest request ) : EndPoint

Create a endpoint for the destination that should be reached.

Private Methods

Méthode Description
GetMessage ( IRequest request ) : string
GetMessage ( IResponse response ) : string
OnRequest ( object sender, RequestEventArgs e ) : void
OnResponse ( object sender, ResponseEventArgs e ) : void

Method Details

CreateEndPoint() protected méthode

Create a endpoint for the destination that should be reached.
protected CreateEndPoint ( IRequest request ) : EndPoint
request IRequest Request to send
Résultat System.Net.EndPoint

Register() public méthode

Register a new transport implementation.
Server have already been started.
public Register ( ITransport transport ) : void
transport ITransport
Résultat void

Send() public méthode

public Send ( IRequest request ) : void
request IRequest
Résultat void

Send() public méthode

public Send ( IResponse response ) : void
response IResponse
Résultat void

Start() public méthode

Start layer.
public Start ( ) : void
Résultat void

TransportLayer() public méthode

Initializes a new instance of the TransportLayer class.
public TransportLayer ( MessageFactory messageFactory ) : System
messageFactory SipSharp.Messages.MessageFactory
Résultat System