Stuck with UdpState
public static void ReceiveCallback(IAsyncResult ar)
{UdpClient u = (UdpClient)((UdpState)(ar.AsyncState)).u;
IPEndPoint e = (IPEndPoint)((UdpState)(ar.AsyncState)).e;
Byte[] receiveBytes = u.EndReceive(ar, ref e); string receiveString = Encoding.ASCII.GetString(receiveBytes); Console.WriteLine("Received: {0}", receiveString);
messageReceived = true;
}
The part I am having problems understanding is the first two lines... UdpClient and IPEndPoint, more specifically the UdpState part of them. I can't find UdpState anywhere, so I came to the conclusion that I must make that myself (a class?), but I have no idea as to what to put in it. I've had a look on Google but couldn't find anything useful.
Any help would be appreciated.

