get_underlying_object() added for sockets