Module Constants
Constants used in replication betwen Server and Client, mostly describing the protocol between them.
The actual behavior of commands/events are implemented in these classes.
Commands
Commands are listed in the Constants.Commands
table, where the key/value is the name of the command. Commands may
require certain server Permissions for clients to invoke them.
Note: on this page, they are described as functions (methods).
Events
Events are listed in the Constants.Events
table, where the key/value is the name of the event. Some events
will only replicate to clients with certain Permissions on the server.
Events
Opened | Fires when the server opens, indicating that a Client may make commands to it. |
Closed | Fires when the server closes, indicating that no Client may make commands to it, and events will not replicate (except Opened). |
Value | Fires with the present value of the VirtualValue replicated by the server. |
Functions
GetPermissions() | Returns the permissions of the requesting client, as returned by Permissions:collect. |
Get() | Returns the current value. |
Set(newValue) | Sets the current value. |
Events
- Opened
- Fires when the server opens, indicating that a Client may make commands to it. Replicated to all clients.
- Closed
- Fires when the server closes, indicating that no Client may make commands to it, and events will not replicate (except Opened). Replicated to all clients.
- Value
-
Fires with the present value of the VirtualValue replicated by the server. It may or may not have changed.
Replicated to clients with
Read
permission.- newValue The present value
Functions
Methods- GetPermissions()
- Returns the permissions of the requesting client, as returned by Permissions:collect. Requires no permission.
- Get()
-
Returns the current value. Requires
Read
permission. - Set(newValue)
-
Sets the current value. Requires
Write
permission. May cause Value event to fire.Parameters:
- newValue The new value