internal static event McpPacketHandler McpPacketProc; //MCP封包事件 /// <summary> /// MCP命令封包解碼(解碼整個封包) /// </summary> /// <param name="socket">作用中的Socket類別</param> /// <param name="token">SocketToken類別</param> internal static void Decode(Socket socket, SocketToken token) { PacketDecode(socket, token); if (token.IsDataToTemp) { token.Move(); PacketDecode(socket, token); token.Reduction(4096, 512); } }
private static DecodeFinance __cFinance = new DecodeFinance(); //解碼所有國際金融期貨 /// <summary> /// 解碼函式(解碼所有封包) /// </summary> /// <param name="socket">作用中的Socket類別</param> /// <param name="token">SocketToken類別</param> /// <param name="isDecode">是否啟動解碼功能</param> public static void Decode(Socket socket, SocketToken token, bool isDecode) { token.IsStart = false; PacketDecode(socket, token, isDecode); if (token.IsDataToTemp) { token.IsStart = true; token.Move(); PacketDecode(socket, token, isDecode); token.Reduction(2048, 512); } }