Home
last modified time | relevance | path

Searched refs:socket_fd (Results 1 – 3 of 3) sorted by relevance

/hal_espressif-3.4.0/components/vfs/test/
Dtest_vfs_select.c75 int socket_fd = -1; in socket_init() local
81 socket_fd = socket(res->ai_family, res->ai_socktype, 0); in socket_init()
82 TEST_ASSERT(socket_fd >= 0); in socket_init()
87 err = bind(socket_fd, (struct sockaddr *) &saddr, sizeof(struct sockaddr_in)); in socket_init()
90 err = connect(socket_fd, res->ai_addr, res->ai_addrlen); in socket_init()
95 return socket_fd; in socket_init()
128 static void init(int *uart_fd, int *socket_fd) in init() argument
140 *socket_fd = socket_init(); in init()
143 static void deinit(int uart_fd, int socket_fd) in deinit() argument
149 close(socket_fd); in deinit()
[all …]
Dtest_vfs_lwip.c25 int socket_fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
27 fstat(socket_fd, &stat);
36 close(socket_fd);
/hal_espressif-3.4.0/examples/system/select/main/
Dselect_example.c28 static int socket_fd = -1; variable
32 close(socket_fd); in socket_deinit()
33 socket_fd = -1; in socket_deinit()
55 socket_fd = socket(res->ai_family, res->ai_socktype, 0); in socket_init()
57 if (socket_fd < 0) { in socket_init()
66 err = bind(socket_fd, (struct sockaddr *) &saddr, sizeof(struct sockaddr_in)); in socket_init()
74 if (connect(socket_fd, res->ai_addr, res->ai_addrlen) != 0) { in socket_init()
145 int write_bytes = write(socket_fd, buf, strlen(buf)); in socket_write_task()
184 FD_SET(socket_fd, &rfds); in select_task()
186 s = select(MAX(uart_fd, socket_fd) + 1, &rfds, NULL, NULL, &tv); in select_task()
[all …]