Esempio n. 1
0
        private void response_msg(WebSocketSession session, string message)
        {
            //Console.WriteLine("Response message " + " : " + message);
            logger.Info("Send Response message " + " : " + message);
            ResponseJSONFormat resmsg_json = new ResponseJSONFormat();

            resmsg_json.msg = message;

            session.Send(resmsg_json.Serialize());
        }
        /// <summary>
        /// Send response message to client.
        /// </summary>
        /// <param name="session">WebSocket session.</param>
        /// <param name="message">Message to send.</param>
        protected void send_response_msg(WebSocketSession session, string message)
        {
            ResponseJSONFormat json_response_msg = new ResponseJSONFormat();

            json_response_msg.msg = message;
            session.Send(json_response_msg.Serialize());

            IPAddress destinationAddress = session.RemoteEndPoint.Address;

            logger.Info("Send Response message to " + destinationAddress.ToString() + " : " + message);
        }