C# Класс Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrtp.PccrtpServer

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

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

Метод Описание
Dispose ( ) : void

Release the managed and unmanaged resources.

GenerateResponseMessage ( string resourceLocator, string serverSecret ) : PccrtpResponse

Generate PCCRTP response message to reply the client request.

PccrtpServer ( int listenPort, IPAddressType addressType ) : System

Initializes a new instance of the PccrtpServer class with specified logger instance.

PccrtpServer ( int listenPort, IPAddressType addressType, ILogPrinter logger ) : System

Initializes a new instance of the PccrtpServer class with specified logger instance.

ReceivePccrtpRequest ( System.TimeSpan timeOut ) : PccrtpRequest

The method is used to receive the PCCRTP request.

SentPccrtpResponse ( PccrtpResponse response ) : void

The method is used to send PCCRTP response message.

StartServer ( ) : void

The method is used to start PCCRTP server and start to listen request input.

StopServer ( ) : void

The method is used to stop the PCCRTP server and start to listen request input.

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

Метод Описание
Dispose ( bool disposing ) : void

Release resources.

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

Метод Описание
OnHttpRequestMessageReceived ( object sender, HttpRequestEventArg e ) : void

The handle to HTTP request message.

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

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

Release the managed and unmanaged resources.
public Dispose ( ) : void
Результат void

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

Release resources.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, managed and unmanaged resources are disposed. /// If false, only unmanaged resources can be disposed. ///
Результат void

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

Generate PCCRTP response message to reply the client request.
public GenerateResponseMessage ( string resourceLocator, string serverSecret ) : PccrtpResponse
resourceLocator string The client request URI.
serverSecret string The server secret set on the server endpoint.
Результат PccrtpResponse

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

Initializes a new instance of the PccrtpServer class with specified logger instance.
public PccrtpServer ( int listenPort, IPAddressType addressType ) : System
listenPort int Indicates the PCCRTP server's listen port.
addressType IPAddressType Indicates the PCCRTP server's address type is Ipv4 or Ipv6.
Результат System

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

Initializes a new instance of the PccrtpServer class with specified logger instance.
public PccrtpServer ( int listenPort, IPAddressType addressType, ILogPrinter logger ) : System
listenPort int Indicates the PCCRTP server's listen port.
addressType IPAddressType Indicates the PCCRTP server's address type is Ipv4 or Ipv6.
logger ILogPrinter An instance of ILogPrinter.
Результат System

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

The method is used to receive the PCCRTP request.
public ReceivePccrtpRequest ( System.TimeSpan timeOut ) : PccrtpRequest
timeOut System.TimeSpan The timeout to wait the response.
Результат PccrtpRequest

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

The method is used to send PCCRTP response message.
public SentPccrtpResponse ( PccrtpResponse response ) : void
response PccrtpResponse The PCCRTP response message.
Результат void

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

The method is used to start PCCRTP server and start to listen request input.
public StartServer ( ) : void
Результат void

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

The method is used to stop the PCCRTP server and start to listen request input.
public StopServer ( ) : void
Результат void