Ejemplo n.º 1
0
 public Task Handle(INetConnection connection, AskCommandRequest command)
 {
     connection.SendMessage(PacketId.ACK_COMMAND_RESPONSE, new AskCommandResponse()
     {
         Command = Command.ASK_DATETIME
     });
     return(Task.CompletedTask);
 }
Ejemplo n.º 2
0
        public Task Handle(INetConnection connection, AskCommandResponse command)
        {
            Console.WriteLine("[*] Receiver AskCommandResponse: " + command.Command);

            switch (command.Command)
            {
            case Command.ASK_DATETIME:
                connection.SendMessage(PacketId.ACK_DATETIME_RESPONSE, new AskDatetimeResponse()
                {
                    CurrentDatetime = DateTime.Now
                });
                break;
            }
            return(Task.CompletedTask);
        }