Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between connected and unconnected sockets?

Answer Posted / chaitanya

If a UDP socket is unconnected, which is the normal state after a bind() call, then send() or write() are not allowed, since no destination address is available; only sendto() can be used to send data.

Calling connect() on the socket simply records the specified address and port number as being the desired communications partner. That means that send() or write() are now allowed; they use the destination address and port given on the connect call as the destination of the packet.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are sockets files?

927


What is a sae socket?

969


Why do we need sockets?

885


What does af mean in sockets?

991


What is the difference between read() and recv()?

2015


What is socket programming in java?

887


What is the difference between SO_REUSEADDR and SO_REUSEPORT?

1841


What is active unix domain sockets?

950


Whats the difference between select() and poll()?

1710


How can I set the timeout for the connect() system call?

1543


Why sockets are used?

934


How many socket connections can a server handle?

902


How are unix domain sockets implemented?

910


Is socket a hardware or software?

966


How is a socket created?

968