partial sockets implementation