Lines Matching defs:c_hdl
1416 struct comm_point* c = (struct comm_point*)arg, *c_hdl;
1430 c_hdl = c->tcp_free;
1433 ub_event_free(c_hdl->ev->ev);
1434 c_hdl->ev->ev = NULL;
1435 if((c_hdl->type == comm_tcp && c_hdl->tcp_req_info) ||
1436 c_hdl->type == comm_local || c_hdl->type == comm_raw)
1437 c_hdl->tcp_do_toggle_rw = 0;
1438 else c_hdl->tcp_do_toggle_rw = 1;
1440 if(c_hdl->type == comm_http) {
1442 if(!c_hdl->h2_session ||
1443 !http2_session_server_create(c_hdl->h2_session)) {
1447 if(!c_hdl->h2_session ||
1448 !http2_submit_settings(c_hdl->h2_session)) {
1453 c_hdl->tcp_do_toggle_rw = 0;
1454 c_hdl->use_h2 = 1;
1457 c_hdl->ev->ev = ub_event_new(c_hdl->ev->base->eb->base, -1,
1459 comm_point_http_handle_callback, c_hdl);
1461 c_hdl->ev->ev = ub_event_new(c_hdl->ev->base->eb->base, -1,
1463 comm_point_tcp_handle_callback, c_hdl);
1465 if(!c_hdl->ev->ev) {
1471 new_fd = comm_point_perform_accept(c, &c_hdl->repinfo.remote_addr,
1472 &c_hdl->repinfo.remote_addrlen);
1477 c_hdl->repinfo.client_addrlen = c_hdl->repinfo.remote_addrlen;
1478 memmove(&c_hdl->repinfo.client_addr,
1479 &c_hdl->repinfo.remote_addr,
1480 c_hdl->repinfo.remote_addrlen);
1482 c_hdl->ssl = incoming_ssl_fd(c->ssl, new_fd);
1483 if(!c_hdl->ssl) {
1484 c_hdl->fd = new_fd;
1485 comm_point_close(c_hdl);
1488 c_hdl->ssl_shake_state = comm_ssl_shake_read;
1490 comm_point_tcp_win_bio_cb(c_hdl, c_hdl->ssl);
1496 c->tcp_free = c_hdl->tcp_free;
1497 c_hdl->tcp_free = NULL;
1502 setup_tcp_handler(c_hdl, new_fd, c->cur_tcp_count, c->max_tcp_count);