A few changes to UdpSocket and TcpSocket