Hi, 1) I would say so. From the connect man page.
If the socket *sockfd* is of type *SOCK_DGRAM*, then *addr* is the address to which datagrams are sent by default, and the only address from which datagrams are received. 2) See: https://github.com/libuv/libuv/pull/1274#issuecomment-289270649 Cheers, Santi El sáb., 16 mar. 2019 a las 21:05, Iñaki Baz Castillo (<[email protected]>) escribió: > Hi, > > I've seen that 1.27.0 allows connected UDP sockets, which is great. > Let me a few questions about it: > > 1) If the UDP socket is connected (uv_udp_connect() was called with IP > 1.2.3.4 and port 555), does it mean that UDP datagrams coming from any > other IP:port will be dropped by the kernel or by libuv? > > 2) Is a connected UDP socket more efficient than a non connected one > (assuming that in the non connected one I do NOT create a new sockaddr > but a permanently allocated one)? or is it just cometic? > > > -- > Iñaki Baz Castillo > <[email protected]> > > -- > You received this message because you are subscribed to the Google Groups > "libuv" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/libuv. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
