Groups | Blog | Home
all groups > dotnet sdk > october 2006 >

dotnet sdk : UdpClient vs Socket


David Thielen
10/5/2006 4:47:02 PM
Hi;

I've noticed a lot of the MS samples show using Socket rather than UdpClient
for UDP stuff. Is that the suggested approach?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm

David Thielen
10/5/2006 9:17:01 PM
Thanks - that's what I thought by the sample code went the other way. I'll
use UdpClient.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




[quoted text, click to view]
v-phuang NO[at]SPAM online.microsoft.com (
10/6/2006 2:22:26 AM
Hi David,

Based on my experience, the Udpclient is just a wrap for Socket. So that we
did not need to handle many socket related operation. But in nature, the
UDPclient is using Socket for underlying communication.
In my view, I think the difference is udpclient is easy use and socket
class will have more control over the socket.
To choose Udpclient or socket is based on your scenario, if the job can be
done in udpclient, I think we can use the udpclient because you will find
that it will need less code than socket class.
TinyUDP - Simple UDP Client/Server Components for .NET
http://www.codeproject.com/vb/net/TinyUDP.asp

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button