modified cf_socket