Interface IWolfClientCache
Utility grouping common entity caches together.
Inherited Members
Namespace: TehGM.Wolfringo.Caching
Assembly: Wolfringo.Core.dll
Syntax
public interface IWolfClientCache : IWolfClientCacheAccessor
Remarks
This utility contains caches for entities that Wolf client is caching.
Each cache can be separately enabled or disabled.
Methods
| Improve this Doc View SourceOnConnectingAsync(IWolfClient, CancellationToken)
Invoked when client is about to connect to the server.
Declaration
Task OnConnectingAsync(IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | WOLF client that is connecting to the server. |
System.Threading.CancellationToken | cancellationToken | Cancellation token that can be used for Task cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
OnDisconnected(IWolfClient, SocketClosedEventArgs)
Invoked when the client has disconnected from the server.
Declaration
void OnDisconnected(IWolfClient client, SocketClosedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | WOLF client that has disconnected from the server. |
SocketClosedEventArgs | e | Event args raised when connection was closed. |
OnMessageReceivedAsync(IWolfClient, IWolfMessage, SerializedMessageData, CancellationToken)
Handle message received from the server.
Declaration
Task OnMessageReceivedAsync(IWolfClient client, IWolfMessage message, SerializedMessageData rawMessage, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | WOLF client that received the message. |
IWolfMessage | message | Received message. |
SerializedMessageData | rawMessage | Raw received message. |
System.Threading.CancellationToken | cancellationToken | Cancellation token that can be used for Task cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
OnMessageSentAsync(IWolfClient, IWolfMessage, IWolfResponse, SerializedMessageData, CancellationToken)
Handle message sent by the client, and the server's response.
Declaration
Task OnMessageSentAsync(IWolfClient client, IWolfMessage message, IWolfResponse response, SerializedMessageData rawResponse, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | WOLF client that sent the message. |
IWolfMessage | message | Sent message. |
IWolfResponse | response | Response received. |
SerializedMessageData | rawResponse | Raw response data. |
System.Threading.CancellationToken | cancellationToken | Cancellation token that can be used for Task cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |