C# Класс 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.

Наследование: ITransportLayer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
CreateEndPoint ( IRequest request ) : EndPoint

Create a endpoint for the destination that should be reached.

Приватные методы

Метод Описание
GetMessage ( IRequest request ) : string
GetMessage ( IResponse response ) : string
OnRequest ( object sender, RequestEventArgs e ) : void
OnResponse ( object sender, ResponseEventArgs e ) : void

Описание методов

CreateEndPoint() защищенный Метод

Create a endpoint for the destination that should be reached.
protected CreateEndPoint ( IRequest request ) : EndPoint
request IRequest Request to send
Результат System.Net.EndPoint

Register() публичный Метод

Register a new transport implementation.
Server have already been started.
public Register ( ITransport transport ) : void
transport ITransport
Результат void

Send() публичный Метод

public Send ( IRequest request ) : void
request IRequest
Результат void

Send() публичный Метод

public Send ( IResponse response ) : void
response IResponse
Результат void

Start() публичный Метод

Start layer.
public Start ( ) : void
Результат void

TransportLayer() публичный Метод

Initializes a new instance of the TransportLayer class.
public TransportLayer ( MessageFactory messageFactory ) : System
messageFactory SipSharp.Messages.MessageFactory
Результат System