Represents an HTTP session, inheriting from the TcpSession class.
More...
|
override void | OnReceived (byte[] buffer, int position, int length) |
| Handles the data received from the client.
|
|
override void | OnDisconnected () |
| Handles the session disconnection.
|
|
virtual void | OnReceivedRequestHeader (HttpRequest request) |
| Called when the request header is received.
|
|
virtual void | OnReceivedRequest (HttpRequest request) |
| Called when the full request is received.
|
|
virtual void | OnReceivedRequestError (HttpRequest request, string error) |
| Called when an error occurs while processing the request.
|
|
virtual void | OnConnecting () |
| Invoked when the session is in the process of connecting.
|
|
virtual void | OnConnected () |
| Invoked when the session has successfully connected.
|
|
virtual void | OnDisconnecting () |
| Invoked when the session is in the process of disconnecting.
|
|
virtual void | OnSent (int sent, int pending) |
| Invoked when data is successfully sent to the remote endpoint.
|
|
virtual void | OnEmpty () |
| Invoked when the send buffer is empty.
|
|
virtual void | OnError (SocketError error) |
| Invoked when an error occurs during the session operation.
|
|
virtual void | Dispose (bool disposingManagedResources) |
| Releases the unmanaged resources used by the TcpSession and optionally releases the managed resources.
|
|
|
HttpRequest | Request [get] |
| Gets the current HTTP request being processed.
|
|
HttpResponse | Response [get] |
| Gets the current HTTP response being processed.
|
|
string | Id [get] |
| Gets the unique identifier for this session.
|
|
TcpServer | Server [get] |
| Gets the server that owns this session.
|
|
Socket | Socket [get] |
| Gets the socket associated with this session.
|
|
bool | IsConnected [get] |
| Gets a value indicating whether the session is currently connected.
|
|
bool | IsDisposed [get] |
| Gets a value indicating whether the session has been disposed.
|
|
bool | IsSocketDisposed [get] |
| Gets a value indicating whether the socket has been disposed.
|
|
TcpServerOptions | Options [get] |
| Gets the options for the TCP server.
|
|
Represents an HTTP session, inheriting from the TcpSession class.
◆ HttpSession()
XmobiTea.ProtonNetServer.HttpSession.HttpSession |
( |
HttpServer | server | ) |
|
Initializes a new instance of the HttpSession class.
- Parameters
-
server | The HTTP server that manages this session. |
◆ OnDisconnected()
override void XmobiTea.ProtonNetServer.HttpSession.OnDisconnected |
( |
| ) |
|
|
protectedvirtual |
◆ OnReceived()
override void XmobiTea.ProtonNetServer.HttpSession.OnReceived |
( |
byte[] | buffer, |
|
|
int | position, |
|
|
int | length ) |
|
protectedvirtual |
◆ OnReceivedRequest()
virtual void XmobiTea.ProtonNetServer.HttpSession.OnReceivedRequest |
( |
HttpRequest | request | ) |
|
|
protectedvirtual |
◆ OnReceivedRequestError()
virtual void XmobiTea.ProtonNetServer.HttpSession.OnReceivedRequestError |
( |
HttpRequest | request, |
|
|
string | error ) |
|
protectedvirtual |
◆ OnReceivedRequestHeader()
virtual void XmobiTea.ProtonNetServer.HttpSession.OnReceivedRequestHeader |
( |
HttpRequest | request | ) |
|
|
protectedvirtual |
◆ SendResponse()
virtual int XmobiTea.ProtonNetServer.HttpSession.SendResponse |
( |
HttpResponse | response | ) |
|
|
virtual |
◆ SendResponseAsync()
virtual bool XmobiTea.ProtonNetServer.HttpSession.SendResponseAsync |
( |
HttpResponse | response | ) |
|
|
virtual |
Sends an HTTP response asynchronously.
- Parameters
-
response | The HTTP response to send. |
- Returns
- True if the response was sent successfully; otherwise, false.
Implements XmobiTea.ProtonNetServer.IHttpSession.
The documentation for this class was generated from the following file:
- XmobiTea.ProtonNetServer/IHttpSession.cs