public UDPServer(UDPAddress udpAddress, UDPMsgService owner) { try { this.owner = owner; this.udpAddress = udpAddress; serverThread = new Thread(new ThreadStart(StartReceive)); serverThread.Start(); Console.WriteLine("UDPServer thread started for " + udpAddress); } catch (Exception e) { Console.WriteLine("An UDP Exception has occurred!" + e.ToString()); serverThread.Abort(); } }
public UDPClient(UDPAddress udpAddress) { this.udpAddress = udpAddress; connect(); }
public UDPMsgService(UDPAddress[] local, UDPAddress[] remote) : base() { this.local = local; this.remote = remote; if (local != null) { serverCount = local.Length; udpServers = new UDPServer[serverCount]; } if (remote != null) { clientCount = remote.Length; udpClients = new UDPClient[clientCount]; } }