C# Class SocketLibrary.Packets.PacketUtil

Afficher le fichier Open project: Wotuu/RTS_XNA_v2

Méthodes publiques

Méthode Description
DecodeInt ( byte bytes ) : int

Converts a byte array with length 4 to an int.

DecodePacketInt ( Packet p, int index ) : int

Decodes a packet that should contain an int.

DecodePacketString ( Packet p, int index ) : String

Decodes a packet to a string.

Method Details

DecodeInt() public static méthode

Converts a byte array with length 4 to an int.
public static DecodeInt ( byte bytes ) : int
bytes byte The bytes to convert.
Résultat int

DecodePacketInt() public static méthode

Decodes a packet that should contain an int.
public static DecodePacketInt ( Packet p, int index ) : int
p Packet The packet
index int The byte index to start searching for the int
Résultat int

DecodePacketString() public static méthode

Decodes a packet to a string.
public static DecodePacketString ( Packet p, int index ) : String
p Packet The packet to decode.
index int
Résultat String