|
ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
|
Represents a secure SSL session with the ability to manage connection, data transmission, and handshake processes. More...
Public Member Functions | |
| SslSession (SslServer server) | |
| Initializes a new instance of the SslSession class. | |
| INetworkStatistics | GetNetworkStatistics () |
| Gets the network statistics for this session. | |
| virtual bool | Disconnect () |
| Disconnects the session, releasing all resources and closing the connection. | |
| virtual int | Send (byte[] buffer) |
| Sends data to the connected client. | |
| virtual int | Send (byte[] buffer, int position, int length) |
| Sends data to the connected client. | |
| virtual bool | SendAsync (byte[] buffer) |
| Asynchronously sends data to the connected client. | |
| virtual bool | SendAsync (byte[] buffer, int position, int length) |
| Asynchronously sends data to the connected client. | |
| void | Dispose () |
| Releases all resources used by the SslSession. | |
Public Member Functions inherited from XmobiTea.ProtonNetServer.ISession | |
Protected Member Functions | |
| virtual void | OnConnecting () |
| Event triggered when the session is connecting. | |
| virtual void | OnConnected () |
| Event triggered when the session is connected. | |
| virtual void | OnHandshaking () |
| Event triggered when the SSL handshake process begins. | |
| virtual void | OnHandshaked () |
| Event triggered when the SSL handshake process is completed. | |
| virtual void | OnDisconnecting () |
| Event triggered when the session is disconnecting. | |
| virtual void | OnDisconnected () |
| Event triggered when the session is disconnected. | |
| virtual void | OnReceived (byte[] buffer, int position, int length) |
| Event triggered when data is received from the client. | |
| virtual void | OnSent (int sent, int pending) |
| Event triggered when data is sent to the client. | |
| virtual void | OnEmpty () |
| Event triggered when the send buffer is empty. | |
| virtual void | OnError (SocketError error) |
| Event triggered when an error occurs in the session. | |
| virtual void | Dispose (bool disposingManagedResources) |
| Releases unmanaged and, optionally, managed resources. | |
Properties | |
| bool | IsHandshaked [get] |
| Gets a value indicating whether the session has completed the SSL handshake. | |
| string | Id [get] |
| Gets the unique identifier for this session. | |
| SslServer | Server [get] |
| Gets the associated server instance for this session. | |
| Socket | Socket [get] |
| Gets the underlying socket for the session. | |
| bool | IsConnected [get] |
| Gets a value indicating whether the session is currently connected. | |
| bool | IsDisposed [get] |
| Indicates whether this session has been disposed. This flag helps ensure that resources are not accessed after disposal. | |
| bool | IsSocketDisposed [get] |
| Indicates whether the underlying socket has been disposed. This flag is important for preventing operations on a closed socket. | |
| TcpServerOptions | Options [get] |
| Contains various configuration options for the TCP server. This includes settings like buffer sizes, keep-alive time, and more. | |
Represents a secure SSL session with the ability to manage connection, data transmission, and handshake processes.
| XmobiTea.ProtonNetServer.SslSession.SslSession | ( | SslServer | server | ) |
Initializes a new instance of the SslSession class.
| server | The SSL server associated with this session. |
|
virtual |
Disconnects the session, releasing all resources and closing the connection.
Implements XmobiTea.ProtonNetServer.ISession.
|
protectedvirtual |
Releases unmanaged and, optionally, managed resources.
| disposingManagedResources | True to release both managed and unmanaged resources; false to release only unmanaged resources. |
Reimplemented in XmobiTea.ProtonNet.Server.Socket.Sessions.SocketSslSession, and XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWssSession.
| INetworkStatistics XmobiTea.ProtonNetServer.SslSession.GetNetworkStatistics | ( | ) |
Gets the network statistics for this session.
Implements XmobiTea.ProtonNetServer.ISession.
|
protectedvirtual |
Event triggered when the session is connected.
Reimplemented in XmobiTea.ProtonNet.Server.Socket.Sessions.SocketSslSession, and XmobiTea.ProtonNet.Server.WebApi.Sessions.WebApiHttpsSession.
|
protectedvirtual |
Event triggered when the session is disconnected.
Reimplemented in XmobiTea.ProtonNet.Server.Socket.Sessions.SocketSslSession, XmobiTea.ProtonNet.Server.WebApi.Sessions.WebApiHttpsSession, XmobiTea.ProtonNetServer.HttpsSession, and XmobiTea.ProtonNetServer.WssSession.
|
protectedvirtual |
Event triggered when the session is disconnecting.
Reimplemented in XmobiTea.ProtonNetServer.WssSession.
|
protectedvirtual |
Event triggered when an error occurs in the session.
| error | The socket error that occurred. |
|
protectedvirtual |
Event triggered when data is received from the client.
| buffer | The buffer containing the received data. |
| position | The position in the buffer where the data starts. |
| length | The number of bytes received. |
Reimplemented in XmobiTea.ProtonNet.Server.Socket.Sessions.SocketSslSession, XmobiTea.ProtonNetServer.HttpsSession, and XmobiTea.ProtonNetServer.WssSession.
|
protectedvirtual |
Event triggered when data is sent to the client.
| sent | The number of bytes sent. |
| pending | The number of bytes pending to be sent. |
|
virtual |
Sends data to the connected client.
| buffer | The data buffer to send. |
Implements XmobiTea.ProtonNetServer.ISession.
Reimplemented in XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWssSession.
|
virtual |
Sends data to the connected client.
| buffer | The data buffer to send. |
| position | The position in the buffer at which to start sending data. |
| length | The number of bytes to send. |
Implements XmobiTea.ProtonNetServer.ISession.
|
virtual |
Asynchronously sends data to the connected client.
| buffer | The data buffer to send. |
Implements XmobiTea.ProtonNetServer.ISession.
Reimplemented in XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWssSession.
|
virtual |
Asynchronously sends data to the connected client.
| buffer | The data buffer to send. |
| position | The position in the buffer at which to start sending data. |
| length | The number of bytes to send. |
Implements XmobiTea.ProtonNetServer.ISession.