Exemple #1
0
        /// <summary>
        /// Initializes the variables and objects required to keep track of clients.
        /// </summary>
        /// <param name="maximumConnections"></param>
        public Server(int maximumConnections)
        {
            //this.port = port;
            this.maximumConnections = maximumConnections;
            Sessions = new ClientSessions(MaximumConnections);

            Sessions.Opened          += new EventHandler(Sessions_Opened);
            Sessions.Closed          += new EventHandler(Sessions_Closed);
            Sessions.IncomingMessage += new EventHandler(Sessions_IncomingMessage);
            Console.WriteLine("Server Started.");
        }
Exemple #2
0
        /// <summary>
        /// Initializes the variables and objects required to keep track of clients.
        /// </summary>
        /// <param name="maximumConnections"></param>
        public Server(int maximumConnections)
        {
            //this.port = port;
            this.maximumConnections = maximumConnections;
            Sessions = new ClientSessions(MaximumConnections);

            Sessions.Opened += new EventHandler(Sessions_Opened);
            Sessions.Closed += new EventHandler(Sessions_Closed);
            Sessions.IncomingMessage += new EventHandler(Sessions_IncomingMessage);
            Console.WriteLine("Server Started.");
        }