Home
last modified time | relevance | path

Searched refs:client (Results 1 – 25 of 287) sorted by relevance

12345678910>>...12

/hal_espressif-3.6.0/components/esp_http_client/
Desp_http_client.c125 static esp_err_t _clear_connection_info(esp_http_client_handle_t client);
166 static esp_err_t esp_http_client_request_send(esp_http_client_handle_t client, int write_len);
167 static esp_err_t esp_http_client_connect(esp_http_client_handle_t client);
168 static esp_err_t esp_http_client_send_post_data(esp_http_client_handle_t client);
170 static esp_err_t http_dispatch_event(esp_http_client_t *client, esp_http_client_event_id_t event_id… in http_dispatch_event() argument
172 esp_http_client_event_t *event = &client->event; in http_dispatch_event()
174 if (client->event_handler) { in http_dispatch_event()
176 event->user_data = client->user_data; in http_dispatch_event()
179 return client->event_handler(event); in http_dispatch_event()
186 esp_http_client_t *client = parser->data; in http_on_message_begin() local
[all …]
/hal_espressif-3.6.0/components/esp_websocket_client/
Desp_websocket_client.c132 static esp_err_t esp_websocket_client_dispatch_event(esp_websocket_client_handle_t client, in esp_websocket_client_dispatch_event() argument
140 event_data.client = client; in esp_websocket_client_dispatch_event()
141 event_data.user_context = client->config->user_context; in esp_websocket_client_dispatch_event()
144 event_data.op_code = client->last_opcode; in esp_websocket_client_dispatch_event()
145 event_data.payload_len = client->payload_len; in esp_websocket_client_dispatch_event()
146 event_data.payload_offset = client->payload_offset; in esp_websocket_client_dispatch_event()
148 if ((err = esp_event_post_to(client->event_handle, in esp_websocket_client_dispatch_event()
155 return esp_event_loop_run(client->event_handle, 0); in esp_websocket_client_dispatch_event()
158 static esp_err_t esp_websocket_client_abort_connection(esp_websocket_client_handle_t client) in esp_websocket_client_abort_connection() argument
160 ESP_WS_CLIENT_STATE_CHECK(TAG, client, return ESP_FAIL); in esp_websocket_client_abort_connection()
[all …]
/hal_espressif-3.6.0/examples/protocols/esp_http_client/main/
Desp_http_client_example.c69 if (!esp_http_client_is_chunked_response(evt->client)) { in _http_event_handler()
75 … output_buffer = (char *) malloc(esp_http_client_get_content_length(evt->client)); in _http_event_handler()
134 esp_http_client_handle_t client = esp_http_client_init(&config); in http_rest_with_url() local
137 esp_err_t err = esp_http_client_perform(client); in http_rest_with_url()
140 esp_http_client_get_status_code(client), in http_rest_with_url()
141 esp_http_client_get_content_length(client)); in http_rest_with_url()
149 esp_http_client_set_url(client, "http://httpbin.org/post"); in http_rest_with_url()
150 esp_http_client_set_method(client, HTTP_METHOD_POST); in http_rest_with_url()
151 esp_http_client_set_header(client, "Content-Type", "application/json"); in http_rest_with_url()
152 esp_http_client_set_post_field(client, post_data, strlen(post_data)); in http_rest_with_url()
[all …]
/hal_espressif-3.6.0/components/bt/host/bluedroid/stack/l2cap/
Dl2cap_client.c51 static void fragment_packet(l2cap_client_t *client, buffer_t *packet);
52 static void dispatch_fragments(l2cap_client_t *client);
124 void l2cap_client_free(l2cap_client_t *client) in l2cap_client_free() argument
126 if (!client) { in l2cap_client_free()
130 list_remove(l2cap_clients, client); in l2cap_client_free()
131 l2cap_client_disconnect(client); in l2cap_client_free()
132 list_free(client->outbound_fragments); in l2cap_client_free()
133 osi_free(client); in l2cap_client_free()
136 bool l2cap_client_connect(l2cap_client_t *client, const bt_bdaddr_t *remote_bdaddr, uint16_t psm) in l2cap_client_connect() argument
138 assert(client != NULL); in l2cap_client_connect()
[all …]
/hal_espressif-3.6.0/components/esp_http_client/test/
Dtest_http_client.c25 esp_http_client_handle_t client = esp_http_client_init(&config_incorrect); variable
26 TEST_ASSERT(client == NULL);
31 client = esp_http_client_init(&config_with_url);
32 TEST_ASSERT(client != NULL);
33 TEST_ASSERT(esp_http_client_cleanup(client) == ESP_OK);
40 client = esp_http_client_init(&config_with_hostname_path);
41 TEST_ASSERT(client != NULL);
42 TEST_ASSERT(esp_http_client_cleanup(client) == ESP_OK);
54 esp_http_client_handle_t client = esp_http_client_init(&config_with_auth); variable
55 TEST_ASSERT_NOT_NULL(client);
[all …]
/hal_espressif-3.6.0/components/bt/esp_ble_mesh/mesh_core/
Dproxy_server.c147 struct bt_mesh_proxy_client *client = NULL; in proxy_sar_timeout() local
151 client = CONTAINER_OF(work, struct bt_mesh_proxy_client, sar_timer.work); in proxy_sar_timeout()
152 if (!client || !client->conn) { in proxy_sar_timeout()
157 net_buf_simple_reset(&client->buf); in proxy_sar_timeout()
158 bt_mesh_gatts_disconnect(client->conn, 0x13); in proxy_sar_timeout()
185 static int filter_set(struct bt_mesh_proxy_client *client, in filter_set() argument
200 (void)memset(client->filter, 0, sizeof(client->filter)); in filter_set()
201 client->filter_type = WHITELIST; in filter_set()
204 (void)memset(client->filter, 0, sizeof(client->filter)); in filter_set()
205 client->filter_type = BLACKLIST; in filter_set()
[all …]
/hal_espressif-3.6.0/components/esp_http_client/include/
Desp_http_client.h45 esp_http_client_handle_t client; /*!< esp_http_client_handle_t context */ member
211 esp_err_t esp_http_client_perform(esp_http_client_handle_t client);
223 esp_err_t esp_http_client_set_url(esp_http_client_handle_t client, const char *url);
237 esp_err_t esp_http_client_set_post_field(esp_http_client_handle_t client, const char *data, int len…
247 int esp_http_client_get_post_field(esp_http_client_handle_t client, char **data);
261 esp_err_t esp_http_client_set_header(esp_http_client_handle_t client, const char *key, const char *…
277 esp_err_t esp_http_client_get_header(esp_http_client_handle_t client, const char *key, char **value…
291 esp_err_t esp_http_client_get_username(esp_http_client_handle_t client, char **value);
305 esp_err_t esp_http_client_set_username(esp_http_client_handle_t client, const char *username);
319 esp_err_t esp_http_client_get_password(esp_http_client_handle_t client, char **value);
[all …]
/hal_espressif-3.6.0/examples/protocols/http_server/advanced_tests/
Dhttp_server_advanced_test.py23 from idf_http_server_test import test as client unknown
74 if not client.spillover_session(got_ip, got_port, max_sessions):
76 if not client.parallel_sessions_adder(got_ip, got_port, max_sessions):
78 if not client.leftover_data_test(got_ip, got_port):
80 if not client.async_response_test(got_ip, got_port):
82 if not client.recv_timeout_test(got_ip, got_port):
84 if not client.arbitrary_termination_test(got_ip, got_port):
93 if not client.get_hello(got_ip, got_port):
103 if not client.get_hello(got_ip, got_port):
105 if not client.post_hello(got_ip, got_port):
[all …]
/hal_espressif-3.6.0/components/mbedtls/test/
Dtest_esp_crt_bundle.c216 esp_err_t client_setup(mbedtls_endpoint_t *client) in client_setup() argument
219 mbedtls_ssl_config_init( &client->conf ); in client_setup()
220 mbedtls_net_init( &client->client_fd ); in client_setup()
221 mbedtls_ssl_init( &client->ssl ); in client_setup()
222 mbedtls_x509_crt_init( &client->cert ); in client_setup()
223 mbedtls_pk_init( &client->pkey ); in client_setup()
224 mbedtls_entropy_init( &client->entropy ); in client_setup()
225 mbedtls_ctr_drbg_init( &client->ctr_drbg ); in client_setup()
228 if ((ret = mbedtls_ctr_drbg_seed(&client->ctr_drbg, mbedtls_entropy_func, &client->entropy, in client_setup()
236 if ((ret = mbedtls_ssl_set_hostname(&client->ssl, SERVER_ADDRESS)) != 0) { in client_setup()
[all …]
/hal_espressif-3.6.0/tools/test_apps/protocols/mqtt/build_test/main/
Dmqtt_app.cpp62 esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg); in mqtt_app_start() local
63 esp_mqtt_client_register_event(client, MQTT_EVENT_ANY, mqtt_event_handler, client); in mqtt_app_start()
64 esp_mqtt_client_start(client); in mqtt_app_start()
65 esp_mqtt_set_config(client, &mqtt_cfg); in mqtt_app_start()
66 int msg_id = esp_mqtt_client_publish(client, "/topic/qos1", "data", 0, 0, 0); in mqtt_app_start()
68 msg_id = esp_mqtt_client_subscribe(client, "/topic/qos0", 0); in mqtt_app_start()
70 msg_id = esp_mqtt_client_subscribe(client, "/topic/qos1", 1); in mqtt_app_start()
72 msg_id = esp_mqtt_client_unsubscribe(client, "/topic/qos1"); in mqtt_app_start()
74 esp_err_t err = esp_mqtt_client_set_uri(client, "mqtt://localhost:1883"); in mqtt_app_start()
76 err = esp_mqtt_client_reconnect(client); in mqtt_app_start()
[all …]
/hal_espressif-3.6.0/examples/protocols/mqtt/ssl/
Dmqtt_ssl_example_test.py10 import paho.mqtt.client as mqtt
22 def on_connect(client, userdata, flags, rc): argument
25 client.subscribe('/topic/qos0')
28 def mqtt_client_task(client): argument
30 client.loop()
34 def on_message(client, userdata, msg): argument
54 client.subscribe('/topic/binary')
55 client.publish('/topic/qos0', 'send binary please')
88 client = None
91 client = mqtt.Client()
[all …]
/hal_espressif-3.6.0/components/wpa_supplicant/src/tls/
Dtls_internal.c30 struct tlsv1_client *client; member
91 conn->client = tlsv1_client_init(); in tls_connection_init()
92 if (conn->client == NULL) { in tls_connection_init()
117 if (conn->client) in tls_connection_deinit()
118 tlsv1_client_deinit(conn->client); in tls_connection_deinit()
131 if (conn->client) in tls_connection_established()
132 return tlsv1_client_established(conn->client); in tls_connection_established()
145 if (conn->client) in tls_connection_shutdown()
146 return tlsv1_client_shutdown(conn->client); in tls_connection_shutdown()
162 if (conn->client == NULL) in tls_connection_set_params()
[all …]
/hal_espressif-3.6.0/components/bt/esp_ble_mesh/mesh_models/client/
Dclient_common.c251 bt_mesh_client_user_data_t *client = NULL; in bt_mesh_client_send_msg() local
260 client = (bt_mesh_client_user_data_t *)param->model->user_data; in bt_mesh_client_send_msg()
261 if (!client) { in bt_mesh_client_send_msg()
266 internal = (bt_mesh_client_internal_data_t *)client->internal_data; in bt_mesh_client_send_msg()
316 …node->op_pending = bt_mesh_client_get_status_op(client->op_pair, client->op_pair_size, param->opco… in bt_mesh_client_send_msg()
378 bt_mesh_client_user_data_t *client = NULL; in bt_mesh_client_init() local
385 client = (bt_mesh_client_user_data_t *)model->user_data; in bt_mesh_client_init()
386 if (!client) { in bt_mesh_client_init()
391 if (!client->internal_data) { in bt_mesh_client_init()
401 client->model = model; in bt_mesh_client_init()
[all …]
/hal_espressif-3.6.0/examples/protocols/mqtt/wss/
Dmqtt_wss_example_test.py10 import paho.mqtt.client as mqtt
21 def on_connect(client, userdata, flags, rc): argument
24 client.subscribe('/topic/qos0')
27 def mqtt_client_task(client): argument
29 client.loop()
33 def on_message(client, userdata, msg): argument
37 client.publish('/topic/qos0', 'data_to_esp32')
67 client = None
70 client = mqtt.Client(transport='websockets')
71 client.on_connect = on_connect
[all …]
/hal_espressif-3.6.0/examples/protocols/mqtt/ws/
Dmqtt_ws_example_test.py9 import paho.mqtt.client as mqtt
20 def on_connect(client, userdata, flags, rc): argument
23 client.subscribe('/topic/qos0')
26 def mqtt_client_task(client): argument
28 client.loop()
32 def on_message(client, userdata, msg): argument
36 client.publish('/topic/qos0', 'data_to_esp32')
66 client = None
69 client = mqtt.Client(transport='websockets')
70 client.on_connect = on_connect
[all …]
/hal_espressif-3.6.0/components/esp_websocket_client/include/
Desp_websocket_client.h55 esp_websocket_client_handle_t client; /*!< esp_websocket_client_handle_t context */ member
130 esp_err_t esp_websocket_client_set_uri(esp_websocket_client_handle_t client, const char *uri);
139 esp_err_t esp_websocket_client_start(esp_websocket_client_handle_t client);
155 esp_err_t esp_websocket_client_stop(esp_websocket_client_handle_t client);
170 esp_err_t esp_websocket_client_destroy(esp_websocket_client_handle_t client);
184 int esp_websocket_client_send(esp_websocket_client_handle_t client, const char *data, int len, Tick…
198 int esp_websocket_client_send_bin(esp_websocket_client_handle_t client, const char *data, int len, …
212 int esp_websocket_client_send_text(esp_websocket_client_handle_t client, const char *data, int len,…
231 esp_err_t esp_websocket_client_close(esp_websocket_client_handle_t client, TickType_t timeout);
248 esp_err_t esp_websocket_client_close_with_code(esp_websocket_client_handle_t client, int code, cons…
[all …]
/hal_espressif-3.6.0/examples/protocols/http_server/file_serving/
Dhttp_server_file_serving_test.py18 import http.client
24 from idf_http_server_test import adder as client unknown
54 conn = client.start_session(got_ip, got_port)
63 client.postreq(conn, '/upload/' + str(upload_file_name), upload_data)
75 download_data = client.getreq(conn, '/' + str(upload_file_name))
92 client.postreq(conn, '/upload/' + str(upload_file_name), data=None)
102 client.getreq(conn, '/')
103 except http.client.RemoteDisconnected:
110 conn = client.start_session(got_ip, got_port)
113 client.postreq(conn, '/delete/' + str(upload_file_name), data=None)
[all …]
/hal_espressif-3.6.0/examples/system/ota/native_ota_example/main/
Dnative_ota_example.c40 static void http_cleanup(esp_http_client_handle_t client) in http_cleanup() argument
42 esp_http_client_close(client); in http_cleanup()
43 esp_http_client_cleanup(client); in http_cleanup()
121 esp_http_client_handle_t client = esp_http_client_init(&config); in ota_example_task() local
122 if (client == NULL) { in ota_example_task()
126 err = esp_http_client_open(client, 0); in ota_example_task()
129 esp_http_client_cleanup(client); in ota_example_task()
132 esp_http_client_fetch_headers(client); in ota_example_task()
143 int data_read = esp_http_client_read(client, ota_write_data, BUFFSIZE); in ota_example_task()
146 http_cleanup(client); in ota_example_task()
[all …]
/hal_espressif-3.6.0/components/esp_websocket_client/test/
Dtest_websocket_client.c35 esp_websocket_client_handle_t client = esp_websocket_client_init(&websocket_cfg); variable
36 TEST_ASSERT_NOT_EQUAL(NULL, client);
37 esp_websocket_client_destroy(client);
46 esp_websocket_client_handle_t client = esp_websocket_client_init(&websocket_cfg); variable
47 TEST_ASSERT_NULL(client);
54 esp_websocket_client_handle_t client = esp_websocket_client_init(&websocket_cfg); variable
55 TEST_ASSERT_NOT_EQUAL(NULL, client);
56 TEST_ASSERT_NOT_EQUAL(ESP_OK, esp_websocket_client_set_uri(client, "INVALID"));
57 esp_websocket_client_destroy(client);
/hal_espressif-3.6.0/components/bt/host/bluedroid/stack/include/stack/
Dl2cap_client.h31 void (*connected)(l2cap_client_t *client, void *context);
32 void (*disconnected)(l2cap_client_t *client, void *context);
33 void (*read_ready)(l2cap_client_t *client, buffer_t *packet, void *context);
34 void (*write_ready)(l2cap_client_t *client, void *context);
51 void l2cap_client_free(l2cap_client_t *client);
61 bool l2cap_client_connect(l2cap_client_t *client, const bt_bdaddr_t *remote_bdaddr, uint16_t psm);
65 void l2cap_client_disconnect(l2cap_client_t *client);
69 bool l2cap_client_is_connected(const l2cap_client_t *client);
76 bool l2cap_client_write(l2cap_client_t *client, buffer_t *packet);
/hal_espressif-3.6.0/examples/cxx/experimental/esp_modem_cxx/main/
Dsimple_mqtt_client.cpp31 client = esp_mqtt_client_init(&config); in MqttClientHandle()
32 esp_mqtt_client_register_event(client, MQTT_EVENT_ANY, mqtt_event_handler, this); in MqttClientHandle()
37 esp_mqtt_client_destroy(client); in ~MqttClientHandle()
46 esp_mqtt_client_handle_t client; member
58 esp_mqtt_client_start(h->client); in connect()
75 return esp_mqtt_client_publish(h->client, topic.c_str(), data.c_str(), 0, qos, 0); in publish()
80 return esp_mqtt_client_subscribe(h->client, topic.c_str(), qos); in subscribe()
86 if (event == nullptr || event->client != h->client) in get_topic()
95 if (event == nullptr || event->client != h->client) in get_data()
/hal_espressif-3.6.0/docs/en/api-reference/protocols/
Desp_http_client.rst9 …* :cpp:func:`esp_http_client_init`: To use the HTTP client, the first thing we must do is create a…
11 …lled. It will close the connection (if any) and free up all the memory allocated to the HTTP client
39 if (!esp_http_client_is_chunked_response(evt->client)) {
58 esp_http_client_handle_t client = esp_http_client_init(&config);
59 esp_err_t err = esp_http_client_perform(client);
63 esp_http_client_get_status_code(client),
64 esp_http_client_get_content_length(client));
66 esp_http_client_cleanup(client);
72 Persistent connections means that the HTTP client can re-use the same connection for several transf…
74 To allow the HTTP client to take full advantage of persistent connections, you should do as many of…
[all …]
/hal_espressif-3.6.0/examples/protocols/mqtt/ssl/main/
Dapp_main.c40 static void send_binary(esp_mqtt_client_handle_t client) in send_binary() argument
48 … int msg_id = esp_mqtt_client_publish(client, "/topic/binary", binary_address, binary_size, 0, 0); in send_binary()
66 esp_mqtt_client_handle_t client = event->client; in mqtt_event_handler() local
71 msg_id = esp_mqtt_client_subscribe(client, "/topic/qos0", 0); in mqtt_event_handler()
74 msg_id = esp_mqtt_client_subscribe(client, "/topic/qos1", 1); in mqtt_event_handler()
77 msg_id = esp_mqtt_client_unsubscribe(client, "/topic/qos1"); in mqtt_event_handler()
86 msg_id = esp_mqtt_client_publish(client, "/topic/qos0", "data", 0, 0, 0); in mqtt_event_handler()
101 send_binary(client); in mqtt_event_handler()
131 esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg); in mqtt_app_start() local
133 esp_mqtt_client_register_event(client, ESP_EVENT_ANY_ID, mqtt_event_handler, NULL); in mqtt_app_start()
[all …]
/hal_espressif-3.6.0/components/mqtt/test/
Dtest_mqtt.c24 esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg); variable
25 TEST_ASSERT_EQUAL(NULL, client );
35 esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg); variable
36 TEST_ASSERT_NOT_EQUAL(NULL, client );
37 esp_mqtt_client_destroy(client);
59 esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg); variable
60 TEST_ASSERT_NOT_EQUAL(NULL, client );
63 esp_mqtt_client_publish(client, "test", bin_addr, size, 1, 0);
69 esp_mqtt_client_destroy(client);
/hal_espressif-3.6.0/examples/protocols/http_server/advanced_tests/scripts/
Dtest.py135 import http.client
162 self.client = socket.create_connection((addr, int(port)), timeout=timeout)
172 self.client.sendall(request.encode())
174 self.client.sendall(data.encode())
176 self.client.close()
210 char = self.client.recv(1).decode()
245 self.client.close()
254 read_data += self.client.recv(self.content_len).decode()
259 read_ch = self.client.recv(1)
262 read_ch = self.client.recv(1).decode()
[all …]

12345678910>>...12