New implementation for sockets