C# 클래스 HttpServer.Messages.ResponseWriter

Used to send a response back to the client.

Writes a IResponse object into a stream.

Important! ResponseWriter do not throw any exceptions. Instead it just logs them and let them die peacefully. This is since the response writer is used from catch blocks here and there.

파일 보기 프로젝트 열기: NyxStudios/HttpServer 1 사용 예제들

공개 메소드들

메소드 설명
Send ( IHttpContext context, IResponse response ) : void

Sends response using the specified context.

Send ( IHttpContext context, string data, Encoding encoding ) : void

Converts and sends a string.

SendBody ( IHttpContext context, Stream body ) : void

Send a body to the client

SendErrorPage ( IHttpContext context, IResponse response, Exception exception ) : void
SendHeaders ( IHttpContext context, IResponse response ) : void

Send all headers to the client

메소드 상세

Send() 공개 메소드

Sends response using the specified context.
public Send ( IHttpContext context, IResponse response ) : void
context IHttpContext The context.
response IResponse The response.
리턴 void

Send() 공개 메소드

Converts and sends a string.
public Send ( IHttpContext context, string data, Encoding encoding ) : void
context IHttpContext
data string
encoding System.Text.Encoding Encoding used to transfer string
리턴 void

SendBody() 공개 메소드

Send a body to the client
public SendBody ( IHttpContext context, Stream body ) : void
context IHttpContext Context containing the stream to use.
body Stream Body to send
리턴 void

SendErrorPage() 공개 메소드

public SendErrorPage ( IHttpContext context, IResponse response, Exception exception ) : void
context IHttpContext
response IResponse
exception System.Exception
리턴 void

SendHeaders() 공개 메소드

Send all headers to the client
public SendHeaders ( IHttpContext context, IResponse response ) : void
context IHttpContext Content used to send headers.
response IResponse Response containing call headers.
리턴 void