public bool SetServerIPAddress(string _IPAddressServer) { IPAddress ipaddr = null; if (!IPAddress.TryParse(_IPAddressServer, out ipaddr)) { controller.UpdateMessageBox("Wrong II my Friend!"); return(false); } mServerIPAddress = ipaddr; return(true); }
public void BotAnnouncment(string port) { MyPortNum = Int32.Parse(port); Shob = new UdpClient(); IPEndPoint ep = new IPEndPoint(IPAddress.Parse("255.255.255.255"), ShobPortNum); // endpoint where server is listening Shob.Connect(ep); // send data controller.UpdateMessageBox("Bot is listening on port " + MyPortNum); SendBotAnnouncment(); //Waiting thread to wait for attack //var receivedData = Shob.Receive(ref ep); }