Свойство | Тип | Описание | |
---|---|---|---|
Available | bool |
Свойство | Тип | Описание | |
---|---|---|---|
Dispose | void | ||
OnReceive | void | ||
OnRequestCompleted | void | ||
OnRequestLine | void |
Метод | Описание | |
---|---|---|
Cleanup ( ) : void |
Clean up context. Make sure to call base.Cleanup() if you override the method. |
|
Close ( ) : void | ||
Disconnect ( SocketError error ) : void |
Disconnect from client
|
|
Dispose ( ) : void | ||
HttpClientContext ( bool secured, |
Initializes a new instance of the HttpClientContext class.
|
|
Respond ( string body ) : void |
Send a response.
|
|
Respond ( string httpVersion, HttpServer.HttpStatusCode statusCode, string reason ) : void |
Send a response.
|
|
Respond ( string httpVersion, HttpServer.HttpStatusCode statusCode, string reason, string body, string contentType ) : void |
Send a response.
|
|
Send ( byte buffer ) : void |
send a whole buffer
|
|
Send ( byte buffer, int offset, int size ) : void |
Send data using the stream
|
|
Start ( ) : void |
Start reading content. Make sure to call base.Start() if you override this method. |
Метод | Описание | |
---|---|---|
OnBodyBytesReceived ( object sender, HttpServer.Parser.BodyEventArgs e ) : void |
Process incoming body bytes.
|
|
OnHeaderReceived ( object sender, HttpServer.Parser.HeaderEventArgs e ) : void |
|
Метод | Описание | |
---|---|---|
Dispose ( bool unmanaged ) : void | ||
OnReceive ( IAsyncResult ar ) : void | ||
OnRequestCompleted ( object source, |
||
OnRequestLine ( object sender, HttpServer.Parser.RequestLineEventArgs e ) : void |
public Disconnect ( SocketError error ) : void | ||
error | SocketError | error to report in the |
Результат | void |
public HttpClientContext ( bool secured, |
||
secured | bool | true if the connection is secured (SSL/TLS) |
remoteEndPoint | client that connected. | |
stream | Stream | Stream used for communication |
parserFactory | IRequestParserFactory | Used to create a |
bufferSize | int | Size of buffer to use when reading data. Must be at least 4096 bytes. |
sock | Socket | |
log | ILogWriter | |
Результат | System |
protected OnBodyBytesReceived ( object sender, HttpServer.Parser.BodyEventArgs e ) : void | ||
sender | object | |
e | HttpServer.Parser.BodyEventArgs | Bytes |
Результат | void |
protected OnHeaderReceived ( object sender, HttpServer.Parser.HeaderEventArgs e ) : void | ||
sender | object | |
e | HttpServer.Parser.HeaderEventArgs | |
Результат | void |
public Respond ( string httpVersion, HttpServer.HttpStatusCode statusCode, string reason ) : void | ||
httpVersion | string | Either |
statusCode | HttpServer.HttpStatusCode | HTTP status code |
reason | string | reason for the status code. |
Результат | void |
public Respond ( string httpVersion, HttpServer.HttpStatusCode statusCode, string reason, string body, string contentType ) : void | ||
httpVersion | string | Either |
statusCode | HttpServer.HttpStatusCode | HTTP status code |
reason | string | reason for the status code. |
body | string | HTML body contents, can be null or empty. |
contentType | string | A content type to return the body as, i.e. 'text/html' or 'text/plain', defaults to 'text/html' if null or empty |
Результат | void |
public Send ( byte buffer, int offset, int size ) : void | ||
buffer | byte | Contains data to send |
offset | int | Start position in buffer |
size | int | number of bytes to send |
Результат | void |