By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,469 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Can I use one UdpClient object for both send and receive operation

P: n/a
I am looking into UdpClient sample code from MSDN where one UdpClient object
used for both send and receive operation.

Please take a look at the link below
http://msdn.microsoft.com/library/de...classtopic.asp

I can't make similar to this code work. The udpClient.Receive method waits
for timeout seconds and then throws exception "timeout expired".

If however I use different UdpClient objects, one for send and another for
receive then everything works fine. And this make sense to me since when we
used Winsock in VC 6.0 projects, we always created two sockets: one for send
and another for receive operations.

Can anyone clarify whether it is possible to use one UdpClient object for
both send and receive operations. If yes could you provide simple example in
C#.

Thank you
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.