[Mono-list] UDP Socket not firing

Steve Ricketts velocedge at hotmail.com
Sun May 9 13:12:12 EDT 2010


Ok, used BeginReceivedFrom and still not firing.

Socket udpAudioReceiver = new
Socket(AddressFamily.InterNetwork,SocketType.Dgram, ProtocolType.Udp);
IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 6267);
udpAudioReceiver.Bind(ipep);
acb = new AsyncCallback(udpAudioReceiver_DataArrival);
IPEndPoint clients = new IPEndPoint(IPAddress.Any, 0);
EndPoint epSender = (EndPoint)clients;
udpAudioReceiver.BeginReceiveFrom (udpAudioReceiverBuffer, 0,
udpAudioReceiverBuffer.Length, SocketFlags.None, ref epSender, acb, null);

...

private void udpAudioReceiver_DataArrival (IAsyncResult asyn)
{
	IPEndPoint clients = new IPEndPoint(IPAddress.Any, 0);
	EndPoint epSender = (EndPoint)clients;
	udpAudioReceiver.EndReceiveFrom(asyn, ref epSender);

	udpAudioReceiver.BeginReceiveFrom (udpAudioReceiverBuffer, 0,
udpAudioReceiverBuffer.Length, SocketFlags.None, ref epSender, acb, null);
} 

-- 
View this message in context: http://mono.1490590.n4.nabble.com/Re-UDP-Socket-not-firing-tp2132756p2164537.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list