Finish implementation, and add datagram sockets