revamped isocket to no do all the work, so sockets can readily be opened and closed via this class.