C# Class MysqlPot.Mysql

Mostra file Open project: schmalle/MysqlPot Class Usage Examples

Public Methods

Method Description
Mysql ( int packetNumber, StreamWriter w ) : System
convert32To3Byte ( Int32 input ) : byte[]
copyBytes ( byte source, byte dest, int offsetDest, bool nullTerminated ) : byte[]
generateAnswerPacket ( String queryString ) : byte[]
generateOKPacket ( int packetNumber, int affectedRows ) : byte[]
getAnswerPacket ( byte queryBytes, int packetNumber ) : byte[]
getGreetingPacket ( ) : byte[]
getGreetingPacket ( int packetNumber ) : byte[]
getPacketError ( String data, int packetNumber, System.Int64 length, System.Int64 errorNumber ) : byte[]
getPacketNumber ( byte data ) : byte
handleLoginPacket ( byte dataIn, String clientIP, String token, String username, String host ) : void
handleQueryPacket ( byte dataIn, String clientIP, String token, String username, String host ) : byte[]

Private Methods

Method Description
byteArrayCompare ( byte shortArray, byte longArray ) : bool
getBytes ( String inStr ) : byte[]

Method Details

Mysql() public method

public Mysql ( int packetNumber, StreamWriter w ) : System
packetNumber int
w System.IO.StreamWriter
return System

convert32To3Byte() public method

public convert32To3Byte ( Int32 input ) : byte[]
input System.Int32
return byte[]

copyBytes() public method

public copyBytes ( byte source, byte dest, int offsetDest, bool nullTerminated ) : byte[]
source byte
dest byte
offsetDest int
nullTerminated bool
return byte[]

generateAnswerPacket() public method

public generateAnswerPacket ( String queryString ) : byte[]
queryString String
return byte[]

generateOKPacket() public method

public generateOKPacket ( int packetNumber, int affectedRows ) : byte[]
packetNumber int
affectedRows int
return byte[]

getAnswerPacket() public method

public getAnswerPacket ( byte queryBytes, int packetNumber ) : byte[]
queryBytes byte
packetNumber int
return byte[]

getGreetingPacket() public method

public getGreetingPacket ( ) : byte[]
return byte[]

getGreetingPacket() public method

public getGreetingPacket ( int packetNumber ) : byte[]
packetNumber int
return byte[]

getPacketError() public method

public getPacketError ( String data, int packetNumber, System.Int64 length, System.Int64 errorNumber ) : byte[]
data String
packetNumber int
length System.Int64
errorNumber System.Int64
return byte[]

getPacketNumber() public method

public getPacketNumber ( byte data ) : byte
data byte
return byte

handleLoginPacket() public method

public handleLoginPacket ( byte dataIn, String clientIP, String token, String username, String host ) : void
dataIn byte
clientIP String
token String
username String
host String
return void

handleQueryPacket() public method

public handleQueryPacket ( byte dataIn, String clientIP, String token, String username, String host ) : byte[]
dataIn byte
clientIP String
token String
username String
host String
return byte[]