Esempio n. 1
0
        /// <summary>
        /// Creates a new instance connected to the parent profile server.
        /// </summary>
        /// <param name="ProfileServer">Parent profile server.</param>
        /// <param name="LogPrefix">Log prefix of the parent role server.</param>
        public MessageProcessor(ProfileServer ProfileServer)
        {
            log = NLog.LogManager.GetLogger(string.Format("Test.ProfileServer.{0}.MessageProcessor", ProfileServer.Name));
            log.Trace("()");

            profileServer = ProfileServer;

            log.Trace("(-)");
        }
Esempio n. 2
0
        /// <summary>
        /// Creates the instance for a new TCP server client.
        /// </summary>
        /// <param name="Server">Role server that the client connected to.</param>
        /// <param name="TcpClient">TCP client class that holds the connection and allows communication with the client.</param>
        /// <param name="UseTls">true if the client is connected to the TLS port, false otherwise.</param>
        /// <param name="Role">Role of the server the client connected to.</param>
        public IncomingClient(ProfileServer Server, TcpClient TcpClient, bool UseTls, ServerRole Role) :
            base(TcpClient, UseTls, 0, Server.Keys)
        {
            log = NLog.LogManager.GetLogger(string.Format("Test.ProfileServer.{0}.IncomingClient", Server.Name));
            log.Trace("(UseTls:{0})", UseTls);

            serverRole       = Role;
            server           = Server;
            messageProcessor = new MessageProcessor(server);

            ConversationStatus = ClientConversationStatus.NoConversation;

            log.Trace("(-)");
        }