Exemplo n.º 1
0
        public static CIDManager GetInstance()
        {
            if (instance == null)
            {
                instance = new CIDManager();
            }

            return(instance);
        }
Exemplo n.º 2
0
        /*  Конструктор класса  */
        public CServer(string ip, int port, int clientsAmo, CView currUI)
        {
            idManager    = CIDManager.GetInstance();
            clients      = new List <CClient>();
            listenPoint  = new IPEndPoint(IPAddress.Parse(ip), port);
            listenSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

            UI = currUI;
            maxAmoOfConnectedClients = clientsAmo;
            AmoOfConnectedClients    = 0;
            IsServerWork             = false;
            IsServerClosed           = false;
        }