public Client(int _clientId) { id = _clientId; //accessToken = null; tcp = new TCP(id); udp = new UDP(id); }
public static void StartServer(int _port) { port = _port; Console.WriteLine("Starting Server..."); TCP.StartListening(port); UDP.StartListening(port); Console.WriteLine($"Server Started on {port}."); }
public static void Connect(int port, string serverName, int timeOut) { Port = port; ServerName = serverName; TimeOut = timeOut; Console.WriteLine($"\n\t\tMainServerComms trying to connect:{Port}"); InitIncomingPacketHandler(); tCP = new TCP(); tCP.Connect(LocalIP); AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnEndingConsoleApplication); }
public static void Connect(int port, string serverName, string mainServerIP) { Port = port; ServerName = serverName; Output.WriteLine($"\n\t\tMainServerComms trying to connect:{Port}"); InitIncomingPacketHandler(); tCP = new TCP(); tCP.Connect(mainServerIP); Application.quitting += OnApplicationQuiting; ServerSendDataTimer.Elapsed += SendServerDataToMainServer; }
public Client(int _clientId) { Id = _clientId; Action <Packet> receivePacketAction = (packet) => { Server.ReceiveManager.ExecuteOnMainThread(() => { Server.ReceiveManager.ProcessPacket(packet.PacketTypeId, packet); }); }; tcp = new TCP(this, receivePacketAction); if (Constants.AllowUDP) { udp = new UDPSend(this, receivePacketAction); } player = new Player(Id, "NewPlayer", new Vector3(0, 0, 0), this); }
public Client(TcpClient _tcpSocket) { bool foundId = false; for (byte i = 0; i < maxPlayerCount; i++) { if (!allClients.ContainsKey(i)) { foundId = true; } } if (!foundId) { throw new Exception("Max client count exceeded"); } tcp = new TCP(this); udp = new UDP(this); playerController = new PlayerController(); tcp.Connect(_tcpSocket); allClients.Add(id, this); }
public Client(int clientId) { id = clientId; tcpInstance = new TCP(id); udpInstance = new UDP(id); }
public ServerClient(int _clientId) { id = _clientId; tcp = new TCP(id); udp = new UDP(id); }
public Client(int clientID) { id = clientID; tcp = new TCP(id); }
public Client(int iD) { ID = iD; tCP = new TCP(iD); uDP = new UDP(iD); }
public Client(int clientId) { id = clientId; tcp = new TCP(id); udp = new UDP(id); }
public Client(int id) { this.id = id; this.tcp = new TCP(this.id); this.udp = new UDP(this.id); }
public Client(int clientId) { Id = clientId; Tcp = new TCP(clientId); }
public Client(int _clientid) { id = _clientid; tcp = new TCP(id); udp = new UDP(id); }
public Client(int _ClientID) { id = _ClientID; tcp = new TCP(id); udp = new UDP(id); }
public Client(int _clientId) { id = _clientId; tcp = new TCP(id); }
public Client(int clientId) { Id = clientId; Tcp = new TCP(Id); Udp = new UDP(Id); }