Searched refs:server_fd (Results 1 – 2 of 2) sorted by relevance
/DragonOS-0.1.8/user/apps/http_server/ |
D | main.c | 176 int server_fd, new_socket, valread; in main() local 183 if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) in main() 202 if (bind(server_fd, (struct sockaddr *)&address, sizeof(address)) < 0) in main() 209 if (listen(server_fd, 3) < 0) in main() 220 … if ((new_socket = accept(server_fd, (struct sockaddr *)&address, (socklen_t *)&addrlen)) < 0) in main()
|
/DragonOS-0.1.8/user/apps/test_bind/ |
D | main.c | 172 int server_fd; in main() local 176 if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) in main() 194 if (bind(server_fd, (struct sockaddr *)&address, sizeof(address)) < 0) in main() 208 if (listen(server_fd, 3) < 0) in main() 216 if (close(server_fd) < 0) in main()
|