C# Class Economy.scripts.ConnectionHelper

Conains useful methods and fields for organizing the connections.
Afficher le fichier Open project: jpcsupplies/Economy_mod

Méthodes publiques

Свойство Type Description
ClientMessageCache List
ServerMessageCache List>.Dictionary

Méthodes publiques

Méthode Description
GetFreeByteElementCount ( MessageIncomingMessageParts message ) : int

Calculates how many bytes can be stored in the given message.

ProcessData ( byte rawData ) : void
ProcessData ( string dataString ) : void

Server side execution of the actions defined in the data.

SendMessageToAll ( MessageBase message ) : void

Creates and sends an entity with the given information for the server and all players.

SendMessageToAllPlayers ( MessageBase messageContainer ) : void
SendMessageToPlayer ( ulong steamId, MessageBase message ) : void
SendMessageToServer ( MessageBase message ) : void

Creates and sends an entity with the given information for the server. Never call this on DS instance!

Private Methods

Méthode Description
SendMessageParts ( byte byteData, MessageSide side, ulong receiver ) : void

Method Details

GetFreeByteElementCount() public static méthode

Calculates how many bytes can be stored in the given message.
public static GetFreeByteElementCount ( MessageIncomingMessageParts message ) : int
message Economy.scripts.Messages.MessageIncomingMessageParts The message in which the bytes will be stored.
Résultat int

ProcessData() public static méthode

public static ProcessData ( byte rawData ) : void
rawData byte
Résultat void

ProcessData() public static méthode

Server side execution of the actions defined in the data.
public static ProcessData ( string dataString ) : void
dataString string
Résultat void

SendMessageToAll() public static méthode

Creates and sends an entity with the given information for the server and all players.
public static SendMessageToAll ( MessageBase message ) : void
message Economy.scripts.Messages.MessageBase
Résultat void

SendMessageToAllPlayers() public static méthode

public static SendMessageToAllPlayers ( MessageBase messageContainer ) : void
messageContainer Economy.scripts.Messages.MessageBase
Résultat void

SendMessageToPlayer() public static méthode

public static SendMessageToPlayer ( ulong steamId, MessageBase message ) : void
steamId ulong
message Economy.scripts.Messages.MessageBase
Résultat void

SendMessageToServer() public static méthode

Creates and sends an entity with the given information for the server. Never call this on DS instance!
public static SendMessageToServer ( MessageBase message ) : void
message Economy.scripts.Messages.MessageBase
Résultat void

Property Details

ClientMessageCache public_oe static_oe property

public static List ClientMessageCache
Résultat List

ServerMessageCache public_oe static_oe property

public static Dictionary> ServerMessageCache
Résultat List>.Dictionary