Home
last modified time | relevance | path

Searched refs:client_sock (Results 1 – 2 of 2) sorted by relevance

/hal_espressif-3.6.0/examples/openthread/ot_cli/main/
Desp_ot_tcp_socket.c29 int client_sock = 0; in tcp_socket_server_task() local
62 client_sock = accept(listen_sock, (struct sockaddr *)&source_addr, &addr_len); in tcp_socket_server_task()
63 …ESP_GOTO_ON_FALSE((client_sock >= 0), ESP_FAIL, exit, TAG, "Unable to accept connection: errno %d"… in tcp_socket_server_task()
69 setsockopt(client_sock, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); in tcp_socket_server_task()
71 len = recv(client_sock, rx_buffer, sizeof(rx_buffer) - 1, 0); in tcp_socket_server_task()
87 if (client_sock != -1) { in tcp_socket_server_task()
88 shutdown(client_sock, 0); in tcp_socket_server_task()
89 close(client_sock); in tcp_socket_server_task()
101 int client_sock; in tcp_socket_client_task() local
111 client_sock = socket(AF_INET6, SOCK_STREAM, IPPROTO_IPV6); in tcp_socket_client_task()
[all …]
Desp_ot_udp_socket.c85 int client_sock; in udp_socket_client_task() local
97 client_sock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); in udp_socket_client_task()
98 …ESP_GOTO_ON_FALSE((client_sock >= 0), ESP_OK, exit, TAG, "Unable to create socket: errno %d", errn… in udp_socket_client_task()
101 …err = sendto(client_sock, payload, strlen(payload), 0, (struct sockaddr *)&dest_addr, sizeof(dest_… in udp_socket_client_task()
106 …len = recvfrom(client_sock, rx_buffer, sizeof(rx_buffer) - 1, 0, (struct sockaddr *)&source_addr, … in udp_socket_client_task()
115 if (ret != ESP_OK || client_sock != -1) { in udp_socket_client_task()
116 shutdown(client_sock, 0); in udp_socket_client_task()
117 close(client_sock); in udp_socket_client_task()