bruno386 0 Newbie Poster

I am trying to send a udp query, the query works and I recieve -some- data back. However the string I recieve back is not complete, its cut short. If I send the same UDP query using netcat I get the full response.

Must I increase the size of the recieve buffer or something so that the full udp response arrives?

byte[] data = new byte[1024];
                string stringData;
                
                UdpClient server = new UdpClient(currentIP, currentport);

                IPEndPoint send = new IPEndPoint(IPAddress.Any, 0);

                string welcome = "\\players\\";
                data = Encoding.ASCII.GetBytes(welcome);
                server.Send(data, data.Length);

                data = server.Receive(ref send);

                
                stringData = Encoding.ASCII.GetString(data, 0, data.Length);

stringData contains some of the udp response, but not all :<