Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I'm learning "Network Programming", and I have 1 question that :
- What is UDP Socket ?
- What is asynchronous Socket ?
Are they diferent or same ?
Posted

1 solution

I'm not the world's foremost expert on sockets and it's been awhile since I actually used them, but here are some notes to get you started. I suggest you try Google for more information on any specific system you are interested in.

UDP is a transport protocol, so a UDP socket uses UDP, rather than, for example, TCP to move data.

An asynchronous socket uses a call-back or message mechanism to tell your application when it has data. With a synchronous socket, your application polls the socket and is blocked until it gets the data. There are also non-blocking sockets, which are essentially synchronous, except the call always returns immediately, either with or without data, so you may have to poll repeatedly to get data that is delayed.

So, UDP and asynchronous sockets may or may not be the same. The two terms describe different aspects of the sockets. You can have synchronous or asynchronous UDP or TCP sockets, etc.
 
Share this answer
 
Comments
SaoLamEmDau 26-Jun-11 0:37am    
thanks so much !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900