When I use netcat to send a udp query I get a full response. When I use UDPCLIENT class in c#, i dont receieve the full response, it is cut short. Here is my code
byte[] data = new byte[1024];
string stringData;
UdpClient server = new UdpClient(currentIP, currentport);
IPEndPoint send = new IPEndPoint(IPAddress.Any, 0);
string query = "\\players\\";
data = Encoding.ASCII.GetBytes(query);
server.Send(data, data.Length);
data = server.Receive(ref send);
stringData = Encoding.ASCII.GetString(data, 0, data.Length);
MessageBox.Show(stringData);
How do I increase the receieve buffer so that it stores the full UDP response?