Exemplo n.º 1
0
        public async Task SessionReplyAsync(
            string sessionId,
            SessionReplyMessageCode code)
        {
            var session = _sessions[sessionId];

            await SendMessageAsync(
                session,
                MessageType.SessionReply,
                code == SessionReplyMessageCode.SessionAccepted?Instruction.Accept : Instruction.Deny,
                ECDH_Key.ImportKey(session.EcdhPrivateKey).PublicKey,
                new SessionReply
            {
                Code = ((int)code).ToString()
            });
        }
 public static string GetMessageCode(SessionReplyMessageCode messageCode)
 {
     return(((int)messageCode).ToString());
 }