Lines Matching defs:wsi
214 lws_apply_metadata(lws_ss_handle_t *h, struct lws *wsi, uint8_t *buf,
227 if (lws_add_http_header_by_name(wsi,
243 lws_client_http_body_pending(wsi, 1);
258 wsi->http.writeable_len) {
262 (unsigned int)wsi->http.writeable_len);
263 if (lws_add_http_header_by_token(wsi,
268 lws_client_http_body_pending(wsi, 1);
277 lws_apply_instant_metadata(lws_ss_handle_t *h, struct lws *wsi, uint8_t *buf,
288 if (lws_add_http_header_by_name(wsi,
298 lws_client_http_body_pending(wsi, 1);
314 lws_extract_metadata(lws_ss_handle_t *h, struct lws *wsi)
325 n = lws_hdr_total_length(wsi, polmd->value_is_http_token);
327 const char *cp = lws_hdr_simple_ptr(wsi,
336 * it's present on the wsi, we want to
367 n = lws_hdr_custom_length(wsi, (const char *)
389 if (lws_hdr_custom_copy(wsi, p, n + 1,
428 secstream_h1(struct lws *wsi, enum lws_callback_reasons reason, void *user,
432 struct lws_context_per_thread *pt = &wsi->a.context->pt[(int)wsi->tsi];
434 lws_ss_handle_t *h = (lws_ss_handle_t *)lws_get_opaque_user_data(wsi);
450 lwsl_err("%s: CCE with no ss handle %s\n", __func__, lws_wsi_tag(wsi));
454 lws_ss_assert_extant(wsi->a.context, wsi->tsi, h);
462 lws_metrics_caliper_report_hist(h->cal_txn, wsi);
469 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
479 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
483 h->wsi = NULL;
490 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
500 lws_system_cpd_set(lws_get_context(wsi),
512 lws_ss_assert_extant(wsi->a.context, wsi->tsi, h);
515 if (wsi->conmon.pcol == LWSCONMON_PCOL_NONE) {
516 wsi->conmon.pcol = LWSCONMON_PCOL_HTTP;
517 wsi->conmon.protocol_specific.http.response =
518 (int)lws_http_client_http_response(wsi);
524 lws_metrics_caliper_report_hist(h->cal_txn, wsi);
526 // __func__, wsi->lc.gutag);
528 h->wsi = NULL;
542 !h->txn_ok && !wsi->a.context->being_destroyed) {
545 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
554 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
563 lws_ss_assert_extant(wsi->a.context, wsi->tsi, h);
564 h->wsi = wsi; /* since we accept the wsi is bound to the SS,
565 * ensure the SS feels the same way about the wsi */
568 if (wsi->conmon.pcol == LWSCONMON_PCOL_NONE) {
569 wsi->conmon.pcol = LWSCONMON_PCOL_HTTP;
570 wsi->conmon.protocol_specific.http.response =
571 (int)lws_http_client_http_response(wsi);
577 status = (int)lws_http_client_http_response(wsi);
600 lws_http_check_retry_after(wsi, &inter);
604 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
616 if (lws_extract_metadata(h, wsi)) {
634 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi,
655 wsi->client_suppress_CONNECTION_ERROR = 1;
659 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
667 lws_validity_confirmed(wsi);
679 if (lws_hdr_copy(wsi, (char *)buf, sizeof(buf),
730 // lws_header_table_detach(wsi, 0);
744 wsi->http.writeable_len = h->writeable_len;
777 ab = lws_system_get_blob(wsi->a.context, blob_idx[m], 0);
789 if (lws_add_http_header_by_name(wsi,
799 if (lws_apply_metadata(h, wsi, buf, p, end))
804 if (lws_apply_instant_metadata(h, wsi, buf, p, end))
813 if (lws_ss_apply_sigv4(wsi, h, p, end))
837 wsi->client_suppress_CONNECTION_ERROR = 1;
841 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
870 h->wsi = wsi; /* since we accept the wsi is bound to the SS,
871 * ensure the SS feels the same way about the wsi */
874 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
884 m = lws_http_client_read(wsi, &px, &lenx);
888 lws_set_timeout(wsi, 99, 30);
904 wsi->http.writeable_len = h->writeable_len = 0;
919 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
921 lws_cancel_service(lws_get_context(wsi)); /* abort poll wait */
940 if (lws_add_http_common_headers(wsi,
944 NULL, h->wsi->http.writeable_len,
952 if (lws_apply_metadata(h, wsi, buf, &p, end))
955 if (lws_finalize_write_http_header(wsi, start, &p, end))
959 lws_callback_on_writable(wsi);
979 lws_client_http_multipart(wsi,
995 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
1009 lws_client_http_body_pending(wsi, 0);
1012 lws_client_http_multipart(wsi, NULL, NULL, NULL,
1017 h->rideshare = lws_ss_policy_lookup(wsi->a.context,
1019 lws_callback_on_writable(wsi);
1031 lws_callback_on_writable(wsi);
1037 if (lws_write(wsi, buf + LWS_PRE, lws_ptr_diff_size_t(p, buf + LWS_PRE),
1048 lws_http_transaction_completed(wsi))
1051 lws_set_timeout(wsi, 0, 0);
1069 m = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_COLON_METHOD);
1072 lws_hdr_simple_ptr(wsi,
1075 m = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_COLON_PATH);
1077 lws_hdr_simple_ptr(wsi,
1083 m = lws_hdr_total_length(wsi, WSI_TOKEN_GET_URI);
1086 lws_hdr_simple_ptr(wsi,
1092 m = lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI);
1095 lws_hdr_simple_ptr(wsi,
1101 m = lws_hdr_total_length(wsi, WSI_TOKEN_PATCH_URI);
1104 lws_hdr_simple_ptr(wsi,
1122 wsi->client_suppress_CONNECTION_ERROR = 1;
1126 return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h);
1133 wsi, &h);
1142 return lws_callback_http_dummy(wsi, reason, user, in, len);