add some nethod for sockets