C# 클래스 SocketLibrary.Packets.Packet

파일 보기 프로젝트 열기: Wotuu/RTS_XNA_v2 1 사용 예제들

Private Properties

프로퍼티 타입 설명
Packet System

공개 메소드들

메소드 설명
AddData ( byte data ) : void

Adds a byte of data to the list.

AddInt ( int value ) : void

Adds an int to this packet.

AddString ( String s ) : void

Adds a string to this packet

GetData ( ) : byte[]

Gets the data in this packet, excluding the header.

GetFullData ( ) : byte[]

Converts the data in this packet to a byte array, this includes the header.

GetHeader ( ) : byte

Gets the header of this packet.

GetPacketID ( ) : int

Gets the packetID of this packet.

Packet ( byte header ) : System
Packet ( byte header, byte data ) : System
SetHeader ( byte header ) : void

Sets the header of this byte. Also see ProtocolHeader.cs

SetPacketID ( byte bytes ) : void

Sets the packet ID. Must be a length of 4!.

SetPacketID ( int packetID ) : void

Sets the packet ID.

비공개 메소드들

메소드 설명
Packet ( ) : System

메소드 상세

AddData() 공개 메소드

Adds a byte of data to the list.
public AddData ( byte data ) : void
data byte The byte to add
리턴 void

AddInt() 공개 메소드

Adds an int to this packet.
public AddInt ( int value ) : void
value int The int to add
리턴 void

AddString() 공개 메소드

Adds a string to this packet
public AddString ( String s ) : void
s String The string
리턴 void

GetData() 공개 메소드

Gets the data in this packet, excluding the header.
public GetData ( ) : byte[]
리턴 byte[]

GetFullData() 공개 메소드

Converts the data in this packet to a byte array, this includes the header.
public GetFullData ( ) : byte[]
리턴 byte[]

GetHeader() 공개 메소드

Gets the header of this packet.
public GetHeader ( ) : byte
리턴 byte

GetPacketID() 공개 메소드

Gets the packetID of this packet.
public GetPacketID ( ) : int
리턴 int

Packet() 공개 메소드

public Packet ( byte header ) : System
header byte
리턴 System

Packet() 공개 메소드

public Packet ( byte header, byte data ) : System
header byte
data byte
리턴 System

SetHeader() 공개 메소드

Sets the header of this byte. Also see ProtocolHeader.cs
public SetHeader ( byte header ) : void
header byte The header to give this packet
리턴 void

SetPacketID() 공개 메소드

Sets the packet ID. Must be a length of 4!.
public SetPacketID ( byte bytes ) : void
bytes byte The bytes.
리턴 void

SetPacketID() 공개 메소드

Sets the packet ID.
public SetPacketID ( int packetID ) : void
packetID int The packet id.
리턴 void