C# Class Cassini.Connection

Exibir arquivo Open project: gnoso/Chill Class Usage Examples

Private Properties

Property Type Description
Connection System
GetErrorResponseBody string
MakeContentTypeHeader String
MakeResponseHeaders string

Public Methods

Method Description
Close ( ) : void
InitializeLifetimeService ( ) : object
ReadRequestBytes ( int maxBytes ) : byte[]
WaitForRequestBytes ( ) : int
Write100Continue ( ) : void
WriteBody ( byte data, int offset, int length ) : void
WriteEntireResponseFromFile ( String fileName, bool keepAlive ) : void
WriteEntireResponseFromString ( int statusCode, String extraHeaders, String body, bool keepAlive ) : void
WriteErrorAndClose ( int statusCode ) : void
WriteErrorAndClose ( int statusCode, string message ) : void
WriteErrorWithExtraHeadersAndKeepAlive ( int statusCode, string extraHeaders ) : void
WriteHeaders ( int statusCode, String extraHeaders ) : void

Private Methods

Method Description
Connection ( Server server, Socket socket ) : System
GetErrorResponseBody ( int statusCode, string message ) : string
MakeContentTypeHeader ( string fileName ) : String
MakeResponseHeaders ( int statusCode, string moreHeaders, int contentLength, bool keepAlive ) : string

Method Details

Close() public method

public Close ( ) : void
return void

InitializeLifetimeService() public method

public InitializeLifetimeService ( ) : object
return object

ReadRequestBytes() public method

public ReadRequestBytes ( int maxBytes ) : byte[]
maxBytes int
return byte[]

WaitForRequestBytes() public method

public WaitForRequestBytes ( ) : int
return int

Write100Continue() public method

public Write100Continue ( ) : void
return void

WriteBody() public method

public WriteBody ( byte data, int offset, int length ) : void
data byte
offset int
length int
return void

WriteEntireResponseFromFile() public method

public WriteEntireResponseFromFile ( String fileName, bool keepAlive ) : void
fileName String
keepAlive bool
return void

WriteEntireResponseFromString() public method

public WriteEntireResponseFromString ( int statusCode, String extraHeaders, String body, bool keepAlive ) : void
statusCode int
extraHeaders String
body String
keepAlive bool
return void

WriteErrorAndClose() public method

public WriteErrorAndClose ( int statusCode ) : void
statusCode int
return void

WriteErrorAndClose() public method

public WriteErrorAndClose ( int statusCode, string message ) : void
statusCode int
message string
return void

WriteErrorWithExtraHeadersAndKeepAlive() public method

public WriteErrorWithExtraHeadersAndKeepAlive ( int statusCode, string extraHeaders ) : void
statusCode int
extraHeaders string
return void

WriteHeaders() public method

public WriteHeaders ( int statusCode, String extraHeaders ) : void
statusCode int
extraHeaders String
return void