Skip to content

Instantly share code, notes, and snippets.

@fredeil
Created June 26, 2024 11:18
Show Gist options
  • Save fredeil/3a2427419c9fdfb2458c8852733a142f to your computer and use it in GitHub Desktop.
Save fredeil/3a2427419c9fdfb2458c8852733a142f to your computer and use it in GitHub Desktop.
UDP broadcast connection suite server
var port = 4539;
var client = new System.Net.Sockets.UdpClient();
var ip = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("10.0.104.255"), port);
var bytes = System.Text.Encoding.ASCII.GetBytes("HelpINeedDatabaseConfigPlease🫡🫡");
_ = client.Send(bytes, bytes.Length, ip);
var result = await client.ReceiveAsync();
Console.WriteLine(result.RemoteEndPoint.ToString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment