C# 클래스 Microsoft.Protocols.TestTools.StackSdk.CommonStack.HttpServerTransport

The http server side.
상속: IDisposable
파일 보기 프로젝트 열기: Microsoft/WindowsProtocolTestSuites 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void

Implement IDisposable. Do not make this method virtual. A derived class should not be able to override this method.

HttpServerTransport ( TransferProtocol transferProtocol, int listenPort, IPAddressType ipaddressType, string resource ) : System

Initializes a new instance of the HttpServerTransport class.

HttpServerTransport ( TransferProtocol transferProtocol, int listenPort, IPAddressType ipaddressType, string resource, ILogPrinter logger ) : System

Initializes a new instance of the HttpServerTransport class.

HttpServerTransport ( TransferProtocol transferProtocol, int listenPort, string resource ) : System

Initializes a new instance of the HttpServerTransport class.

Send ( string>.Dictionary header, byte payLoadData, HttpListenerContext httpListenerContext ) : void

Send the response message.

Send ( int statusCode, string>.Dictionary header, byte payLoadData, HttpListenerContext httpListenerContext, bool needNextRequest ) : void

Send the response message.

StartHttpServer ( ) : void

Start http server to listen and receive the http request.

StopHttpServer ( ) : void

Stop http server to listen and receive the http request.

비공개 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed

GetListenPrefix ( TransferProtocol transferProtocol, int hostedCacheModeListenPort, string resource ) : string

Get the listen prefix.

HttpRequestManagerStart ( ) : void

The thread start method for http request manager thread.

RaiseIncomingRequest ( HttpListenerContext context ) : void

The event handle for the received http request.

메소드 상세

Dispose() 공개 메소드

Implement IDisposable. Do not make this method virtual. A derived class should not be able to override this method.
public Dispose ( ) : void
리턴 void

HttpServerTransport() 공개 메소드

Initializes a new instance of the HttpServerTransport class.
public HttpServerTransport ( TransferProtocol transferProtocol, int listenPort, IPAddressType ipaddressType, string resource ) : System
transferProtocol TransferProtocol The transport type will be used
listenPort int The listen port.
ipaddressType IPAddressType The IP address type.
resource string The resource.
리턴 System

HttpServerTransport() 공개 메소드

Initializes a new instance of the HttpServerTransport class.
public HttpServerTransport ( TransferProtocol transferProtocol, int listenPort, IPAddressType ipaddressType, string resource, ILogPrinter logger ) : System
transferProtocol TransferProtocol The transport type will be used
listenPort int The listen port.
ipaddressType IPAddressType The IP address type.
resource string The resource.
logger ILogPrinter The logger.
리턴 System

HttpServerTransport() 공개 메소드

Initializes a new instance of the HttpServerTransport class.
public HttpServerTransport ( TransferProtocol transferProtocol, int listenPort, string resource ) : System
transferProtocol TransferProtocol The transport type will be used
listenPort int The listen port.
resource string The resource.
리턴 System

Send() 공개 메소드

Send the response message.
public Send ( string>.Dictionary header, byte payLoadData, HttpListenerContext httpListenerContext ) : void
header string>.Dictionary Http header.
payLoadData byte The payload data.
httpListenerContext System.Net.HttpListenerContext The payload data.
리턴 void

Send() 공개 메소드

Send the response message.
public Send ( int statusCode, string>.Dictionary header, byte payLoadData, HttpListenerContext httpListenerContext, bool needNextRequest ) : void
statusCode int Status code.
header string>.Dictionary Http header.
payLoadData byte The payload data.
httpListenerContext System.Net.HttpListenerContext The http listener context.
needNextRequest bool Whether need next request before sending response.
리턴 void

StartHttpServer() 공개 메소드

Start http server to listen and receive the http request.
Represents Exception about the Thread State Unable to start the request handling process in 10 seconds
public StartHttpServer ( ) : void
리턴 void

StopHttpServer() 공개 메소드

Stop http server to listen and receive the http request.
public StopHttpServer ( ) : void
리턴 void