Session for sockets implemented.