public GameClient(string name, string h, int p, Host host)
     : base(name)
 {
     ServerAddress = h;
     ServerPort = p;
     this.host = host;
     tcpClient = new TcpClient();
 }
 public RelayServer(string name, int port, Host host)
     : base(name)
 {
     this.name = name;
     this.port = port;
     this.host = host;
     if (port != 0)
     {
         tcpServer = new TcpListener(System.Net.IPAddress.Any, port);
     }
     clients = new List<RelaySocket>();
 }
 public MessageBuffer(Host host)
 {
     this.host = host;
     rounds = new List<RoundBuffer>();
     baseStates = new List<RoundBuffer>();
     rounds.Add(new RoundBuffer());
     access = new Semaphore(1, 1);
     notReady = new Semaphore(0, 1);
     hasData = false;
     receivingEverything = false;
     specRound = 0;
     incrementals = 0;
     round = 0;
 }
Example #4
0
        public static void Main(string[] args)
        {
            Log.setLevel(2);
            int port = 10247;
            string host = "127.0.0.1";
            int listen = 10240;
            if (args.Length == 3)
            {
                port = int.Parse(args[0]);
                host = args[1];
                listen = int.Parse(args[2]);
            }
            else
            {
                Console.WriteLine("Start with GamePort GameHost ServerPort");
            }

            Host h = new Host();
            h.startHost(port, host, listen);
        }
 public RelaySessionServer(string name, int port, Host h, MessageBuffer buffer)
     : base(name, port, h)
 {
     this.buffer = buffer;
 }
 public RelaySessionClient(string name, string h, int p, Host host, MessageBuffer buffer)
     : base(name,h,p, host)
 {
     this.buffer = buffer;
 }
 public RelayInfoClient(string name, string h, int p, Host host)
     : base(name,h,p, host)
 {
 }
 public RelayInfoServer(string name, int port, Host h)
     : base(name, port, h)
 {
 }