Class ClientNotification
This is used to notify several clients at same time. It saves shared value which will be converted to network packet and send to all of Related Clients via broadcasting.
Inheritance
System.Object
ClientNotification
Assembly: Eco.Core.dll
Syntax
public sealed class ClientNotification : ValueType
Constructors
ClientNotification(BSONObject, IMvcNetClient, NetworkChannel)
Declaration
public ClientNotification(BSONObject value, IMvcNetClient client, NetworkChannel notificationChannel)
Parameters
ClientNotification(BSONObject, IMvcNetClient[], NetworkChannel)
Declaration
public ClientNotification(BSONObject value, IMvcNetClient[] clients, NetworkChannel notificationChannel)
Parameters
Fields
NetworkChannel
This property allows to select how the property update should be sent in reliable way (TCP-like) either on main channel or on extra one or to send it in not reliable way (UDP-like).
UDP is much faster since it dont need the confirmation of client but you have no guarantee that client will get that update (packet can be lost).
To be used when there are a lot of constantly modifying values at the property and it doesnt matter if client will get all of them. By example, client should carry only about last received position of object, not all of them.
Another useful option - ExtraChannel. This will allow to send the notification in a separate but reliable channel, avoiding blocking general network channel so clients can still opearte while downloading something here.
Declaration
public NetworkChannel NetworkChannel
Field Value
Declaration
public IMvcNetClient RelatedClient
Field Value
Declaration
public IMvcNetClient[] RelatedClients
Field Value
Value
Declaration
Field Value
Extension Methods