Lines Matching refs:s
22 static struct wpabuf * https_recv(int s, int timeout_ms) in https_recv() argument
34 FD_SET(s, &rfds); in https_recv()
39 ret = select(s + 1, &rfds, NULL, NULL, &tv); in https_recv()
52 len = recv(s, wpabuf_put(in, 0), wpabuf_tailroom(in), 0); in https_recv()
76 static int https_server(int s) in https_server() argument
112 in = https_recv(s, 5000); in https_server()
128 if (send(s, wpabuf_head(out), wpabuf_len(out), 0) < 0) { in https_server()
152 in = https_recv(s, 5000); in https_server()
189 if (send(s, wpabuf_head(out), wpabuf_len(out), 0) < 0) { in https_server()
203 close(s); in https_server()
212 int port, s, conn; in main() local
225 s = socket(AF_INET, SOCK_STREAM, 0); in main()
226 if (s < 0) { in main()
231 if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) { in main()
241 if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) { in main()
243 close(s); in main()
247 if (listen(s, 10) < 0) { in main()
249 close(s); in main()
257 conn = accept(s, (struct sockaddr *) &addr, &addr_len); in main()
272 close(s); in main()