of the socket? Does doing a connect() call affect the receive behaviour?

Answer Posted / chaitanya

Yes, in two ways. First, only datagrams from your "connected peer" are returned. All others arriving at your port are not delivered to you.

But most importantly, a UDP socket must be connected to receive ICMP errors.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of socket?

516


How to find other end of unix socket connection?

516


How can I tell when a socket is closed on the other end?

975


What exactly is a socket?

526


What is af_inet in socket?

478






What are the pros/cons of select(), non-blocking I/O and SIGIO?

978


Is socket a hardware or software?

505


What is active unix domain sockets?

552


Is there any advantage to handling the signal, rather than just ignoring it and checking for the EPIPE error? Are there any useful parameters passed to the signal catching function?

1041


Can multiple sockets use the same port?

498


How can I write a multi-homed server?

1275


What is the purpose of socket?

505


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

1598


What pieces of information make up a socket?

547


Why sockets are used?

525