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); }
public void SendResponse(ResponseData response) { byte[] data = JsonSerializer.SerializeToUtf8Bytes(response); SendData(_protector.Encrypt(data)); _logger.ToLogProvider(data); }