Lines Matching defs:h2_session

3155 static int http2_session_server_create(struct http2_session* h2_session)
3157 log_assert(h2_session->callbacks);
3158 h2_session->is_drop = 0;
3159 if(nghttp2_session_server_new(&h2_session->session,
3160 h2_session->callbacks,
3161 h2_session) == NGHTTP2_ERR_NOMEM) {
3170 static int http2_submit_settings(struct http2_session* h2_session)
3175 h2_session->c->http2_max_streams}};
3177 ret = nghttp2_submit_settings(h2_session->session, NGHTTP2_FLAG_NONE,
3218 if(!c_hdl->h2_session ||
3219 !http2_session_server_create(c_hdl->h2_session)) {
3223 if(!c_hdl->h2_session ||
3224 !http2_submit_settings(c_hdl->h2_session)) {
3525 if(c->type == comm_http && c->h2_session) {
5043 static void http2_session_delete(struct http2_session* h2_session)
5046 if(h2_session->callbacks)
5047 nghttp2_session_callbacks_del(h2_session->callbacks);
5048 free(h2_session);
5050 (void)h2_session;
5067 static void http2_stream_delete(struct http2_session* h2_session,
5072 h2_session->c);
5095 static void http2_session_server_delete(struct http2_session* h2_session)
5099 nghttp2_session_del(h2_session->session); /* NULL input is fine */
5100 h2_session->session = NULL;
5101 for(h2_stream = h2_session->first_stream; h2_stream;) {
5103 http2_stream_delete(h2_session, h2_stream);
5106 h2_session->first_stream = NULL;
5107 h2_session->is_drop = 0;
5108 h2_session->postpone_drop = 0;
5109 h2_session->c->h2_stream = NULL;
5111 (void)h2_session;
5115 void http2_session_add_stream(struct http2_session* h2_session,
5118 if(h2_session->first_stream)
5119 h2_session->first_stream->prev = h2_stream;
5120 h2_stream->next = h2_session->first_stream;
5121 h2_session->first_stream = h2_stream;
5126 static void http2_session_remove_stream(struct http2_session* h2_session,
5132 h2_session->first_stream = h2_stream->next;
5142 struct http2_session* h2_session = (struct http2_session*)cb_arg;
5144 h2_session->session, stream_id))) {
5147 http2_session_remove_stream(h2_session, h2_stream);
5148 http2_stream_delete(h2_session, h2_stream);
5155 struct http2_session* h2_session = (struct http2_session*)cb_arg;
5158 log_assert(h2_session->c->type == comm_http);
5159 log_assert(h2_session->c->h2_session);
5162 if(h2_session->c->ssl) {
5165 r = SSL_read(h2_session->c->ssl, buf, len);
5167 int want = SSL_get_error(h2_session->c->ssl, r);
5173 h2_session->c->ssl_shake_state = comm_ssl_shake_hs_write;
5174 comm_point_listen_for_rw(h2_session->c, 0, 1);
5193 ret = recv(h2_session->c->fd, buf, len, MSG_DONTWAIT);
5205 &h2_session->c->repinfo.remote_addr,
5206 h2_session->c->repinfo.remote_addrlen);
5213 ub_winsock_tcp_wouldblock(h2_session->c->ev->ev,
5219 &h2_session->c->repinfo.remote_addr,
5220 h2_session->c->repinfo.remote_addrlen);
5234 log_assert(c->h2_session);
5237 ret = nghttp2_session_recv(c->h2_session->session);
5249 if(nghttp2_session_want_write(c->h2_session->session)) {
5253 } else if(!nghttp2_session_want_read(c->h2_session->session))
5485 struct http2_session* h2_session = (struct http2_session*)cb_arg;
5486 log_assert(h2_session->c->type == comm_http);
5487 log_assert(h2_session->c->h2_session);
5490 if(h2_session->c->ssl) {
5493 r = SSL_write(h2_session->c->ssl, buf, len);
5495 int want = SSL_get_error(h2_session->c->ssl, r);
5499 h2_session->c->ssl_shake_state = comm_ssl_shake_hs_read;
5500 comm_point_listen_for_rw(h2_session->c, 1, 0);
5521 ret = send(h2_session->c->fd, buf, len, 0);
5537 &h2_session->c->repinfo.remote_addr,
5538 h2_session->c->repinfo.remote_addrlen);
5545 ub_winsock_tcp_wouldblock(h2_session->c->ev->ev,
5553 &h2_session->c->repinfo.remote_addr,
5554 h2_session->c->repinfo.remote_addrlen);
5568 log_assert(c->h2_session);
5570 ret = nghttp2_session_send(c->h2_session->session);
5577 if(nghttp2_session_want_read(c->h2_session->session)) {
5581 } else if(!nghttp2_session_want_write(c->h2_session->session))
6126 if(!(c->h2_session = http2_session_create(c))) {
6135 if(!(c->h2_session->callbacks = http2_req_callbacks_create())) {
6137 http2_session_delete(c->h2_session);
6158 http2_session_delete(c->h2_session);
6558 if(c->h2_session)
6559 http2_session_server_delete(c->h2_session);
6614 if(c->h2_session) {
6615 http2_session_delete(c->h2_session);
6708 if(!http2_submit_dns_response(repinfo->c->h2_session)) {
6741 if(repinfo->c->h2_session) {
6742 repinfo->c->h2_session->is_drop = 1;
6743 if(!repinfo->c->h2_session->postpone_drop)