I am working in C, using the POSIX socket API.
I am not sure when it is appropriate to connect a datagram socket. As I understand it, UDP is connectionless, and SOCK_DGRAM sockets use UDP. So what happens when connect() and accept() are used on datagram sockets?
It seems to me that connecting them and using send()/recv() is easier than not connecting them and using sendto()/recvfrom().
Is there a difference in the functionality of the sockets when connected, or is this just an abstraction?