Home > Net >  Are connected UDP sockets widely used?
Are connected UDP sockets widely used?

Time:04-22

I am learning about sockets in C, and I just learned that you can connect an UDP socket (and its consequences) through this piece of documentation from IBM.
My question is: How popular are UDP connected sockets nowadays, and what could be an example of its usage over unconnected UDP sockets?

CodePudding user response:

They are essentially the same sockets, just accessed with different function calls. If you only intend to communicate with one address, then you might find it more convenient to use a connected socket, so that you don't need to give the address to each send call, and you don't need to check the address when receiving.

  • Related