메소드 | 설명 | |
---|---|---|
Disconnect ( SocketError error ) : void |
Disconnect from client
|
|
HttpClientContextImp ( bool secured, |
Initializes a new instance of the HttpClientContextImp class.
|
|
HttpClientContextImp ( bool secured, |
Initializes a new instance of the HttpClientContextImp 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
|
메소드 | 설명 | |
---|---|---|
Check100Continue ( ) : void |
This method checks the request if a responde to 100-continue should be sent. 100 continue is a value in the Expect header. It's used to let the webserver determine if a request can be handled. The client waits for a reply before sending the body. |
메소드 | 설명 | |
---|---|---|
OnReceive ( IAsyncResult ar ) : void | ||
OnRequestCompleted ( IHttpRequest request ) : void |
public Disconnect ( SocketError error ) : void | ||
error | SocketError | error to report in the |
리턴 | void |
public HttpClientContextImp ( bool secured, |
||
secured | bool | true if the connection is secured (SSL/TLS) |
remoteEndPoint | client that connected. | |
requestHandler | RequestReceivedHandler | delegate handling incoming requests. |
disconnectHandler | ClientDisconnectedHandler | delegate being called when a client disconnectes |
stream | Stream | Stream used for communication |
writer | ILogWriter | delegate used to write log entries |
리턴 | System |
public HttpClientContextImp ( bool secured, |
||
secured | bool | true if the connection is secured (SSL/TLS) |
remoteEndPoint | client that connected | |
stream | Stream | Stream used for communication |
requestHandler | RequestReceivedHandler | delegate handling incoming requests. |
리턴 | System |
public Respond ( string httpVersion, HttpServer.HttpStatusCode statusCode, string reason ) : void | ||
httpVersion | string | Either HttpHelper.HTTP10 or HttpHelper.HTTP11 |
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 HttpHelper.HTTP10 or HttpHelper.HTTP11 |
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, ie '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 |