Diarkis C# Client SDK
Classes | Static Public Member Functions | Static Public Attributes | List of all members
Diarkis.Lib.Packet Class Reference

Classes

struct  Addr
 
class  Error
 
class  Header
 
class  Notification
 
struct  P2PClientAddr
 
struct  Parsed
 
struct  UDPPacket
 

Static Public Member Functions

static P2PClientAddr[] GetP2PClientAddrs (byte[] bytes, string myAddr)
 
static Error ToError (byte[] bytes)
 
static string ExtractClientAddressFromKeepAlive (byte[] payload)
 
static byte[] ExtractAdditionalDataFromKeepAlive (byte[] payload)
 
static Notification[] ExtractNotifications (byte[] bytes)
 
static ushort ToUInt16BE (byte[] bytes, int offset)
 
static byte[] AddrToBytes (string addr, int port)
 
static Addr AddrFromBytes (byte[] bytes)
 
static byte[] Combine (byte[] buf, byte[] packet)
 
static byte[] Combine (byte[] buf, byte[] packet, int packetLength)
 
static byte[] Slice (byte[] buf, int offset, int size)
 
static bool Equal (byte[] b1, int start1, int end1, byte[] b2, int start2, int end2)
 
static byte[] DictionaryToBytes (Dictionary< string, double > dic)
 
static Dictionary< string, double > ToDictionary (byte[] bytes)
 
static byte[] StringListToBytes (List< string > list)
 
static string[] ToStringList (byte[] payload)
 
static byte[] BytesListToBytesMin (List< byte[]> list)
 
static List< byte[]> BytesToBytesListMin (byte[] bytes)
 
static byte[] BytesListToBytes (List< byte[]> list)
 
static List< byte[]> ToBytesList (byte[] payload)
 
static bool IsReconnectPayload (byte[] payload)
 
static string ParseReconnectPayload (byte[] payload)
 
static byte[] CreateUDPPacket (uint flag, uint seq, byte[] packet)
 
static byte[] Create (uint ver, uint cmd, byte[] payload)
 
static byte[] CreateSecurePayload (byte[] sid, byte[] key, byte[] iv, byte[] macKey, byte[] payload)
 
static byte[] CreateSecurePayload (byte[] sid, byte[] key, byte[] iv, byte[] macKey, byte[] payload, int payloadLength)
 
static byte[] DecryptSecurePayload (byte[] key, byte[] iv, byte[] macKey, byte[] payload)
 
static UDPPacket ParseUDPPacket (byte[] packet)
 
static Parsed Parse (byte[] packet)
 
static Header ParseHeader (byte[] packet)
 

Static Public Attributes

const uint UDP_PROTO = 0x1
 
const uint RUDP_PROTO_SYN = 0x2
 
const uint RUDP_PROTO_DAT = 0x3
 
const uint RUDP_PROTO_ACK = 0x4
 
const uint RUDP_PROTO_RST = 0x5
 
const uint RUDP_PROTO_EACK = 0x6
 
const uint RUDP_PROTO_FIN = 0x7
 
const uint PUSH_STATUS = 0xFF
 
const int REQ_HEADER_SIZE = 10
 
const int RES_HEADER_SIZE = 11
 

The documentation for this class was generated from the following file: