Example #1
0
 public HaritaDurumObject(int servertype, ServerForm form)
 {
     this.servertype  = servertype;
     this.webSocketUI = form;
     observers        = new HashSet <IClientObserver>();
     db = new DatabaseFactory(servertype);
 }
Example #2
0
        public Server(int servertype, ServerForm pwebSocketUI)
        {
            switch (servertype)
            {
            case 0: // local
                _server = new TcpListener(IPAddress.Parse("127.0.0.1"), 90);
                break;

            case 1: //canli
                //_server = new TcpListener(IPAddress.Parse("10.100.2.99"), 90);
                _server = new TcpListener(IPAddress.Parse("127.0.0.1"), 90);
                break;

            case 2: //test
                _server = new TcpListener(IPAddress.Parse("127.0.0.1"), 90);
                break;
            }

            webSocketUI       = pwebSocketUI;
            haritaDurumObject = new HaritaDurumObject(servertype, webSocketUI);
            haritaDurumObject.listenDataBase();
            bannedClientIPs = new List <string>();
        }