update sockets class
added function of sockets class