Sockets realization improved