Exemplo n.º 1
0
        public ResponseData SendLoginRequest(LoginData login)
        {
            SendData(protector.Encrypt(JsonSerializer.SerializeToUtf8Bytes(login)));

            var response = GetResponse();

            if (response.Code == 0 && response.SessionId != Guid.Empty)
            {
                _guid = response.SessionId;
            }
            return(response);
        }
Exemplo n.º 2
0
 public void SendResponse(ResponseData response)
 {
     byte[] data = JsonSerializer.SerializeToUtf8Bytes(response);
     SendData(_protector.Encrypt(data));
     _logger.ToLogProvider(data);
 }