private void OnWebSocketOpen(WebSocket webSocket)
        {
            Debug.Log("WebSocket open! now login.");
            SocketRequest req = new SocketRequest();

            req.p1 = GUIDHelper.generate();
            req.p2 = "login";
            req.p3 = DataHelper.GetInstance().LoadToken(dbManager);
            req.p4 = SystemInfo.deviceUniqueIdentifier;

            webSocket.Send(DESHelper.EncodeBytes(GZipHelper.compress(ProtoHelper.Proto2Bytes(req)), AppContext.GetInstance().getDesKey()));
        }
 public void SendBytes(byte[] buffer)
 {
     webSocket.Send(DESHelper.EncodeBytes(GZipHelper.compress(buffer), AppContext.GetInstance().getDesKey()));
 }