C# Class Economy.scripts.ConnectionHelper

Conains useful methods and fields for organizing the connections.
ファイルを表示 Open project: jpcsupplies/Economy_mod

Public Properties

Property Type Description
ClientMessageCache List
ServerMessageCache List>.Dictionary

Public Methods

Method 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

Method Description
SendMessageParts ( byte byteData, MessageSide side, ulong receiver ) : void

Method Details

GetFreeByteElementCount() public static method

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.
return int

ProcessData() public static method

public static ProcessData ( byte rawData ) : void
rawData byte
return void

ProcessData() public static method

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

SendMessageToAll() public static method

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
return void

SendMessageToAllPlayers() public static method

public static SendMessageToAllPlayers ( MessageBase messageContainer ) : void
messageContainer Economy.scripts.Messages.MessageBase
return void

SendMessageToPlayer() public static method

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

SendMessageToServer() public static method

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
return void

Property Details

ClientMessageCache public_oe static_oe property

public static List ClientMessageCache
return List

ServerMessageCache public_oe static_oe property

public static Dictionary> ServerMessageCache
return List>.Dictionary