Пример #1
0
        /// <summary>
        /// Processes PingRequest message from client.
        /// <para>Simply copies the payload to a new ping response message.</para>
        /// </summary>
        /// <param name="Client">Client that sent the request.</param>
        /// <param name="RequestMessage">Full request message.</param>
        /// <returns>Response message to be sent to the client.</returns>
        public ProxProtocolMessage ProcessMessagePingRequest(IncomingClient Client, ProxProtocolMessage RequestMessage)
        {
            log.Trace("()");

            ProxMessageBuilder messageBuilder = Client.MessageBuilder;
            PingRequest        pingRequest    = RequestMessage.Request.SingleRequest.Ping;

            ProxProtocolMessage res = messageBuilder.CreatePingResponse(RequestMessage, pingRequest.Payload.ToByteArray(), ProtocolHelper.GetUnixTimestampMs());

            log.Trace("(-):*.Response.Status={0}", res.Response.Status);
            return(res);
        }