C# Class Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrtp.PccrtpServer

The test server.
Inheritance: IDisposable
Afficher le fichier Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Release resources.

Private Methods

Méthode Description
OnHttpRequestMessageReceived ( object sender, HttpRequestEventArg e ) : void

The handle to HTTP request message.

Method Details

Dispose() public méthode

Release the managed and unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

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. ///
Résultat void

GenerateResponseMessage() public méthode

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.
Résultat PccrtpResponse

PccrtpServer() public méthode

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.
Résultat System

PccrtpServer() public méthode

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.
Résultat System

ReceivePccrtpRequest() public méthode

The method is used to receive the PCCRTP request.
public ReceivePccrtpRequest ( System.TimeSpan timeOut ) : PccrtpRequest
timeOut System.TimeSpan The timeout to wait the response.
Résultat PccrtpRequest

SentPccrtpResponse() public méthode

The method is used to send PCCRTP response message.
public SentPccrtpResponse ( PccrtpResponse response ) : void
response PccrtpResponse The PCCRTP response message.
Résultat void

StartServer() public méthode

The method is used to start PCCRTP server and start to listen request input.
public StartServer ( ) : void
Résultat void

StopServer() public méthode

The method is used to stop the PCCRTP server and start to listen request input.
public StopServer ( ) : void
Résultat void