C# Class BonCodeAJP13Namespace.BonCodeAJP13Packet

abstract class, Represents the base class for all BonCodeAJP13 Server Packets, don't create an instance of this class directly
Datei anzeigen Open project: Bilal-S/iis2tomcat Class Usage Examples

Protected Properties

Property Type Description
m_PacketType byte
m_UserDataLength System.UInt16

Public Methods

Method Description
BonCodeAJP13Packet ( ) : System
BonCodeAJP13Packet ( byte Buffer ) : System

Initialize the packet from the buffer, this is the normal case, it sets the essential properties of the packet like type

GetDataBytes ( ) : byte[]

Returns the raw data of the packet in an array of bytes

GetPacket ( byte Buffer ) : BonCodeAJP13Packet

Analyze the provided buffer and returns suitable packet instance

GetPackets ( byte Buffer ) : BonCodeAJP13.BonCodeAJP13PacketCollection

Analyze the provided buffer and returns a collection of packets represented by the buffer

PrintPacket ( ) : string

Returns a string of the packet's properties and their values

Protected Methods

Method Description
FlipArray ( byte Data ) : byte[]

Flips the array to send it using the big endian convention

GetByte ( byte Data, byte &Value, int Pos ) : int

Get the byte value from the array starting from the position Pos

GetByteArray ( byte Data, byte &Value, int Pos, int ArrayLength ) : int

Get the byte array value from the Data array starting from the position Pos

GetDateTime ( byte Data, System.DateTime &Value, int Pos ) : int

Get the DateTime value from the array starting from the position Pos

GetDouble ( byte Data, double &Value, int Pos ) : int

Get the Double value from the array starting from the position Pos

GetInt16 ( byte Data, Int16 &Value, int Pos ) : int

Get the Int16 value from the array starting from the position Pos

GetInt32 ( byte Data, Int32 &Value, int Pos ) : int

Get the Int32 value from the array starting from the position Pos

GetInt64 ( byte Data, System.Int64 &Value, int Pos ) : int

Get the Int64 value from the array starting from the position Pos

GetString ( byte Data, string &Value, int Pos, int StrLength ) : int

Get the String value from the array starting from the position Pos

GetUInt16 ( byte Data, UInt16 &Value, int Pos ) : int

Get the UInt16 value from the array starting from the position Pos

GetUInt32 ( byte Data, UInt32 &Value, int Pos ) : int

Get the UInt32 value from the array starting from the position Pos

GetUInt64 ( byte Data, System.UInt64 &Value, int Pos ) : int

Get the UInt64 value from the array starting from the position Pos

SetByte ( byte Data, byte Value, int Pos ) : int

Set the byte value in the array starting from the position Pos

SetByteArray ( byte Data, byte Value, int Pos, int ArrayLength ) : int

Set the byte array in the Data array starting from the position Pos

SetDateTime ( byte Data, System.DateTime Value, int Pos ) : int

Set the DateTime value in the array starting from the position Pos

SetDouble ( byte Data, double Value, int Pos ) : int

Set the Double value in the array starting from the position Pos

SetInt16 ( byte Data, Int16 Value, int Pos ) : int

Set the Int16 value in the array starting from the position Pos

SetInt32 ( byte Data, Int32 Value, int Pos ) : int

Set the Int32 value in the array starting from the position Pos

SetInt64 ( byte Data, System.Int64 Value, int Pos ) : int

Set the Int64 value in the array starting from the position Pos

SetString ( byte Data, string Value, int Pos, int StrLength ) : int

Set the String value in the array starting from the position Pos String will be transmitted prefixed by length in bytes and terminated by zero byte

SetUInt16 ( byte Data, UInt16 Value, int Pos ) : int

Set the UInt16 value in the array starting from the position Pos

SetUInt32 ( byte Data, UInt32 Value, int Pos ) : int

Set the UInt32 value in the array starting from the position Pos

SetUInt64 ( byte Data, System.UInt64 Value, int Pos ) : int

Set the UInt64 value in the array starting from the position Pos

WriteBonCodeAJP13Header ( byte Data ) : int

Initialize the packet's header in the raw data.

Method Details

BonCodeAJP13Packet() public method

public BonCodeAJP13Packet ( ) : System
return System

BonCodeAJP13Packet() public method

Initialize the packet from the buffer, this is the normal case, it sets the essential properties of the packet like type
public BonCodeAJP13Packet ( byte Buffer ) : System
Buffer byte
return System

FlipArray() protected static method

Flips the array to send it using the big endian convention
protected static FlipArray ( byte Data ) : byte[]
Data byte
return byte[]

GetByte() protected static method

Get the byte value from the array starting from the position Pos
protected static GetByte ( byte Data, byte &Value, int Pos ) : int
Data byte
Value byte
Pos int
return int

GetByteArray() protected static method

Get the byte array value from the Data array starting from the position Pos
protected static GetByteArray ( byte Data, byte &Value, int Pos, int ArrayLength ) : int
Data byte
Value byte
Pos int
ArrayLength int
return int

GetDataBytes() public abstract method

Returns the raw data of the packet in an array of bytes
public abstract GetDataBytes ( ) : byte[]
return byte[]

GetDateTime() protected static method

Get the DateTime value from the array starting from the position Pos
protected static GetDateTime ( byte Data, System.DateTime &Value, int Pos ) : int
Data byte
Value System.DateTime
Pos int
return int

GetDouble() protected static method

Get the Double value from the array starting from the position Pos
protected static GetDouble ( byte Data, double &Value, int Pos ) : int
Data byte
Value double
Pos int
return int

GetInt16() protected static method

Get the Int16 value from the array starting from the position Pos
protected static GetInt16 ( byte Data, Int16 &Value, int Pos ) : int
Data byte
Value System.Int16
Pos int
return int

GetInt32() protected static method

Get the Int32 value from the array starting from the position Pos
protected static GetInt32 ( byte Data, Int32 &Value, int Pos ) : int
Data byte
Value System.Int32
Pos int
return int

GetInt64() protected static method

Get the Int64 value from the array starting from the position Pos
protected static GetInt64 ( byte Data, System.Int64 &Value, int Pos ) : int
Data byte
Value System.Int64
Pos int
return int

GetPacket() public static method

Analyze the provided buffer and returns suitable packet instance
public static GetPacket ( byte Buffer ) : BonCodeAJP13Packet
Buffer byte
return BonCodeAJP13Packet

GetPackets() public static method

Analyze the provided buffer and returns a collection of packets represented by the buffer
public static GetPackets ( byte Buffer ) : BonCodeAJP13.BonCodeAJP13PacketCollection
Buffer byte
return BonCodeAJP13.BonCodeAJP13PacketCollection

GetString() protected static method

Get the String value from the array starting from the position Pos
protected static GetString ( byte Data, string &Value, int Pos, int StrLength ) : int
Data byte
Value string
Pos int
StrLength int
return int

GetUInt16() protected static method

Get the UInt16 value from the array starting from the position Pos
protected static GetUInt16 ( byte Data, UInt16 &Value, int Pos ) : int
Data byte
Value System.UInt16
Pos int
return int

GetUInt32() protected static method

Get the UInt32 value from the array starting from the position Pos
protected static GetUInt32 ( byte Data, UInt32 &Value, int Pos ) : int
Data byte
Value System.UInt32
Pos int
return int

GetUInt64() protected static method

Get the UInt64 value from the array starting from the position Pos
protected static GetUInt64 ( byte Data, System.UInt64 &Value, int Pos ) : int
Data byte
Value System.UInt64
Pos int
return int

PrintPacket() public method

Returns a string of the packet's properties and their values
public PrintPacket ( ) : string
return string

SetByte() protected static method

Set the byte value in the array starting from the position Pos
protected static SetByte ( byte Data, byte Value, int Pos ) : int
Data byte
Value byte
Pos int
return int

SetByteArray() protected static method

Set the byte array in the Data array starting from the position Pos
protected static SetByteArray ( byte Data, byte Value, int Pos, int ArrayLength ) : int
Data byte
Value byte
Pos int
ArrayLength int
return int

SetDateTime() protected static method

Set the DateTime value in the array starting from the position Pos
protected static SetDateTime ( byte Data, System.DateTime Value, int Pos ) : int
Data byte
Value System.DateTime
Pos int
return int

SetDouble() protected static method

Set the Double value in the array starting from the position Pos
protected static SetDouble ( byte Data, double Value, int Pos ) : int
Data byte
Value double
Pos int
return int

SetInt16() protected static method

Set the Int16 value in the array starting from the position Pos
protected static SetInt16 ( byte Data, Int16 Value, int Pos ) : int
Data byte
Value System.Int16
Pos int
return int

SetInt32() protected static method

Set the Int32 value in the array starting from the position Pos
protected static SetInt32 ( byte Data, Int32 Value, int Pos ) : int
Data byte
Value System.Int32
Pos int
return int

SetInt64() protected static method

Set the Int64 value in the array starting from the position Pos
protected static SetInt64 ( byte Data, System.Int64 Value, int Pos ) : int
Data byte
Value System.Int64
Pos int
return int

SetString() protected static method

Set the String value in the array starting from the position Pos String will be transmitted prefixed by length in bytes and terminated by zero byte
protected static SetString ( byte Data, string Value, int Pos, int StrLength ) : int
Data byte
Value string
Pos int
StrLength int
return int

SetUInt16() protected static method

Set the UInt16 value in the array starting from the position Pos
protected static SetUInt16 ( byte Data, UInt16 Value, int Pos ) : int
Data byte
Value System.UInt16
Pos int
return int

SetUInt32() protected static method

Set the UInt32 value in the array starting from the position Pos
protected static SetUInt32 ( byte Data, UInt32 Value, int Pos ) : int
Data byte
Value System.UInt32
Pos int
return int

SetUInt64() protected static method

Set the UInt64 value in the array starting from the position Pos
protected static SetUInt64 ( byte Data, System.UInt64 Value, int Pos ) : int
Data byte
Value System.UInt64
Pos int
return int

WriteBonCodeAJP13Header() protected method

Initialize the packet's header in the raw data.
protected WriteBonCodeAJP13Header ( byte Data ) : int
Data byte
return int

Property Details

m_PacketType protected_oe property

protected byte m_PacketType
return byte

m_UserDataLength protected_oe property

protected UInt16,System m_UserDataLength
return System.UInt16