Lines Matching refs:c_hdl
1415 struct comm_point* c = (struct comm_point*)arg, *c_hdl; local
1429 c_hdl = c->tcp_free;
1432 ub_event_free(c_hdl->ev->ev);
1433 c_hdl->ev->ev = NULL;
1434 if((c_hdl->type == comm_tcp && c_hdl->tcp_req_info) ||
1435 c_hdl->type == comm_local || c_hdl->type == comm_raw)
1436 c_hdl->tcp_do_toggle_rw = 0;
1437 else c_hdl->tcp_do_toggle_rw = 1;
1439 if(c_hdl->type == comm_http) {
1441 if(!c_hdl->h2_session ||
1442 !http2_session_server_create(c_hdl->h2_session)) {
1446 if(!c_hdl->h2_session ||
1447 !http2_submit_settings(c_hdl->h2_session)) {
1452 c_hdl->tcp_do_toggle_rw = 0;
1453 c_hdl->use_h2 = 1;
1456 c_hdl->ev->ev = ub_event_new(c_hdl->ev->base->eb->base, -1,
1458 comm_point_http_handle_callback, c_hdl);
1460 c_hdl->ev->ev = ub_event_new(c_hdl->ev->base->eb->base, -1,
1462 comm_point_tcp_handle_callback, c_hdl);
1464 if(!c_hdl->ev->ev) {
1470 new_fd = comm_point_perform_accept(c, &c_hdl->repinfo.remote_addr,
1471 &c_hdl->repinfo.remote_addrlen);
1476 c_hdl->repinfo.client_addrlen = c_hdl->repinfo.remote_addrlen;
1477 memmove(&c_hdl->repinfo.client_addr,
1478 &c_hdl->repinfo.remote_addr,
1479 c_hdl->repinfo.remote_addrlen);
1481 c_hdl->ssl = incoming_ssl_fd(c->ssl, new_fd);
1482 if(!c_hdl->ssl) {
1483 c_hdl->fd = new_fd;
1484 comm_point_close(c_hdl);
1487 c_hdl->ssl_shake_state = comm_ssl_shake_read;
1489 comm_point_tcp_win_bio_cb(c_hdl, c_hdl->ssl);
1495 c->tcp_free = c_hdl->tcp_free;
1496 c_hdl->tcp_free = NULL;
1501 setup_tcp_handler(c_hdl, new_fd, c->cur_tcp_count, c->max_tcp_count);