Lines Matching refs:c_hdl
3201 struct comm_point* c = (struct comm_point*)arg, *c_hdl;
3215 c_hdl = c->tcp_free;
3218 ub_event_free(c_hdl->ev->ev);
3219 c_hdl->ev->ev = NULL;
3220 if((c_hdl->type == comm_tcp && c_hdl->tcp_req_info) ||
3221 c_hdl->type == comm_local || c_hdl->type == comm_raw)
3222 c_hdl->tcp_do_toggle_rw = 0;
3223 else c_hdl->tcp_do_toggle_rw = 1;
3225 if(c_hdl->type == comm_http) {
3227 if(!c_hdl->h2_session ||
3228 !http2_session_server_create(c_hdl->h2_session)) {
3232 if(!c_hdl->h2_session ||
3233 !http2_submit_settings(c_hdl->h2_session)) {
3235 if(c_hdl->h2_session)
3236 http2_session_server_delete(c_hdl->h2_session);
3240 c_hdl->tcp_do_toggle_rw = 0;
3241 c_hdl->use_h2 = 1;
3244 c_hdl->ev->ev = ub_event_new(c_hdl->ev->base->eb->base, -1,
3246 comm_point_http_handle_callback, c_hdl);
3248 c_hdl->ev->ev = ub_event_new(c_hdl->ev->base->eb->base, -1,
3250 comm_point_tcp_handle_callback, c_hdl);
3252 if(!c_hdl->ev->ev) {
3255 if(c_hdl->type == comm_http && c_hdl->h2_session)
3256 http2_session_server_delete(c_hdl->h2_session);
3262 new_fd = comm_point_perform_accept(c, &c_hdl->repinfo.remote_addr,
3263 &c_hdl->repinfo.remote_addrlen);
3266 if(c_hdl->type == comm_http && c_hdl->h2_session)
3267 http2_session_server_delete(c_hdl->h2_session);
3273 c_hdl->repinfo.client_addrlen = c_hdl->repinfo.remote_addrlen;
3274 memmove(&c_hdl->repinfo.client_addr,
3275 &c_hdl->repinfo.remote_addr,
3276 c_hdl->repinfo.remote_addrlen);
3278 c_hdl->ssl = incoming_ssl_fd(c->ssl, new_fd);
3279 if(!c_hdl->ssl) {
3280 c_hdl->fd = new_fd;
3281 comm_point_close(c_hdl);
3284 c_hdl->ssl_shake_state = comm_ssl_shake_read;
3286 comm_point_tcp_win_bio_cb(c_hdl, c_hdl->ssl);
3292 c->tcp_free = c_hdl->tcp_free;
3293 c_hdl->tcp_free = NULL;
3298 setup_tcp_handler(c_hdl, new_fd, c->cur_tcp_count, c->max_tcp_count);