|
bool | Setup (Ws ws) |
| Sets up the instance of as a WebSocket client. More...
|
|
override void | Disappear () |
| Notifies other clients in view that the client is now disappeared. Triggers Field.OnDisappear. More...
|
|
override void | SyncInit (long x, long y, long z, uint syncLimit, uint customFilterID, byte[] msg) |
| Initial sync to the other clients in view. More...
|
|
override void | Sync (long x, long y, long z, uint syncLimit, uint customFilterID, byte[] msg, bool notUsed=true) |
| Sync the client's position More...
|
|
delegate void | ResponseHandler (List< byte[]> remoteMsgList) |
|
delegate void | SyncHandler (byte[] payload) |
|
delegate void | DisappearHandler (string uid) |
|
delegate void | ReconnectHandler (bool success) |
|
delegate void | ServerSyncHandler (bool inSight, byte[] payload) |
|
bool | SetupAsTcp (Tcp tcp) |
| Sets up the instance of as a TCP client. More...
|
|
bool | SetupAsUdp (Udp udp) |
| Sets up the instance of as a UDP client. More...
|
|
void | OnCustomBroadcast (uint ver, uint cmd, Action< byte[]> callback) |
| Registers a callback on custom broadcast by ver and cmd. Must be callback AFTER field.SetupAsUdp or field.SetupAsTcp More...
|
|
|
override ResponseHandler | OnResponseSyncInit |
| The event raised as a server response of SyncInit. More...
|
|
override SyncHandler | OnSync |
| The event is raised when a remote client that is in the field of view sends a message via Sync. More...
|
|
override DisappearHandler | OnDisappear |
| The event is raised when a remote client that is in the field of view is no longer visible. The event is raised when a remote client invokes Disappear also. More...
|
|
override ReconnectHandler | OnReconnect |
| The event is raised when the client auto-reconnect due to server autoscaling. In order to maintain the synchronization of the client, invok Sync() when the event is raised. More...
|
|
override ServerSyncHandler | OnServerSync |
| This event is raised by server only. When the server sends field.ServerSync, it triggers OnServerSync event to be raised. This event is meant to synchoronize custom entity or data (such as NPC etc.) that is encapsulated in the payload byte array. More...
|
|
virtual ResponseHandler | OnResponseSyncInit |
| The event raised as a server response of SyncInit. More...
|
|
virtual SyncHandler | OnSync |
| The event is raised when a remote client that is in the field of view sends a message via Sync. More...
|
|
virtual DisappearHandler | OnDisappear |
| The event is raised when a remote client that is in the field of view is no longer visible. The event is raised when a remote client invokes Disappear also. More...
|
|
virtual ReconnectHandler | OnReconnect |
| The event is raised when the client auto-reconnect due to server autoscaling. In order to maintain the synchronization of the client, invok Sync() when the event is raised. More...
|
|
virtual ServerSyncHandler | OnServerSync |
| This event is raised by server only. When the server sends field.ServerSync, it triggers OnServerSync event to be raised. This event is meant to synchoronize custom entity or data (such as NPC etc.) that is encapsulated in the payload byte array. More...
|
|
|
const uint | STATUS_OK = 1 |
|
const uint | BUILTIN_CMD_VER = 1 |
|
const uint | SYNC_INIT_CMD = 120 |
|
const uint | SYNC_CMD = 121 |
|
const uint | DISAPPEAR_CMD = 123 |
|
const uint | SERVER_SYNC_CMD = 124 |
|
◆ Disappear()
override void Diarkis.Modules.WsField.Disappear |
( |
| ) |
|
|
inlinevirtual |
◆ Setup()
bool Diarkis.Modules.WsField.Setup |
( |
Ws |
ws | ) |
|
|
inline |
◆ Sync()
override void Diarkis.Modules.WsField.Sync |
( |
long |
x, |
|
|
long |
y, |
|
|
long |
z, |
|
|
uint |
syncLimit, |
|
|
uint |
customFilterID, |
|
|
byte[] |
msg, |
|
|
bool |
notUsed = true |
|
) |
| |
|
inlinevirtual |
Sync the client's position
- Parameters
-
x | X position of the client. |
y | Y position of the client. |
z | Z is considered as an "area". For example: different floors of a building etc. |
syncLimit | Maximum number of other clients in view to sync with. |
customFilerID | Indicagtes the usage of custom defined (on the server) filter function when synching. Give 0 to use no filter functions. |
msg | Message to be sent to the clients in view. |
Reimplemented from Diarkis.Modules.Field.
◆ SyncInit()
override void Diarkis.Modules.WsField.SyncInit |
( |
long |
x, |
|
|
long |
y, |
|
|
long |
z, |
|
|
uint |
syncLimit, |
|
|
uint |
customFilterID, |
|
|
byte[] |
msg |
|
) |
| |
|
inlinevirtual |
Initial sync to the other clients in view.
- Parameters
-
x | X position of the client. |
y | Y position of the client. |
z | Z is considered as an "area". For example: different floors of a building etc. |
syncLimit | Maximum number of other clients in view to sync with. |
customFilerID | Indicates the usage of custom defined (on the server) filter function when synching. Give 0 to use no filter functions. |
msg | Message to be sent to the clients in view. |
Reimplemented from Diarkis.Modules.Field.
◆ OnDisappear
override DisappearHandler Diarkis.Modules.WsField.OnDisappear |
The event is raised when a remote client that is in the field of view is no longer visible. The event is raised when a remote client invokes Disappear also.
- Parameters
-
uid | User ID of the remote client that is no longer visible. |
◆ OnReconnect
override ReconnectHandler Diarkis.Modules.WsField.OnReconnect |
The event is raised when the client auto-reconnect due to server autoscaling. In order to maintain the synchronization of the client, invok Sync() when the event is raised.
◆ OnResponseSyncInit
override ResponseHandler Diarkis.Modules.WsField.OnResponseSyncInit |
The event raised as a server response of SyncInit.
- Parameters
-
remoteMsgList | A list of message byte arrays of remote clients that are in the field of view. |
◆ OnServerSync
override ServerSyncHandler Diarkis.Modules.WsField.OnServerSync |
This event is raised by server only. When the server sends field.ServerSync, it triggers OnServerSync event to be raised. This event is meant to synchoronize custom entity or data (such as NPC etc.) that is encapsulated in the payload byte array.
- Parameters
-
inSight | If true, the custom entity or data received is within the field of vision. |
payload | Custom entity or data sent from the server to synchronize. |
◆ OnSync
override SyncHandler Diarkis.Modules.WsField.OnSync |
The event is raised when a remote client that is in the field of view sends a message via Sync.
- Parameters
-
payload | A message byte array from the remote client that is in the field of view. |
The documentation for this class was generated from the following file:
- client/cs/modules/WsField.cs