More refactoring of sockets: udp datagram delivery