public SendServerResponseCommand(Guid clientId, string response, ResponseTypes responseType, MessageHeader header)
 {
     _clientId = clientId;
     _response = response;
     _responseType = responseType;
     _compressionType = header.CompressionType;
     _encryptionType = header.EncryptionHeader.EncryptionType;
 }
 public BroadcastMessageCommand(Guid[] clientList, string response, ResponseTypes responseType, MessageHeader header)
 {
     _clientList = clientList;
     _response = response;
     _responseType = responseType;
     _compressionType = header.CompressionType;
     _encryptionType = header.EncryptionHeader.EncryptionType;
 }
Exemplo n.º 3
0
        public static RequestHeader BuildRequestHeader(EncryptionTypes encryptionType, CompressionTypes compressionType, RequestTypes requestType)
        {
            // first create headers
            EncryptionHeader encryptionHeader = new EncryptionHeader()
            {
                EncryptionType = encryptionType
            };

            MessageHeader messageHeader = new MessageHeader()
            {
                CompressionType = compressionType,
                EncryptionHeader = encryptionHeader
            };

            RequestHeader requestHeader = new RequestHeader()
            {
                RequestType = requestType,
                MessageHeader = messageHeader
            };

            // send response header first
            return requestHeader;
        }