Lines Matching defs:new_fd
2330 int find_fd, conf_fd, new_fd;
2376 if ((new_fd = accept(conf_fd, (struct sockaddr *)&cli_addr, &addr_len)) < 0) {
2382 if ((ret = recv(new_fd, message, 9, 0)) <= 0) {
2387 PSNDRECV("add_remote_device from fd: %d received: %s\n", new_fd, message);
2390 if (send(new_fd, message, strlen(message), 0) < 0) {
2401 if (send(new_fd, message, strlen(message), 0) < 0) {
2411 close(new_fd);
3334 int new_fd;
3345 if ((new_fd = accept(sockfd, (struct sockaddr *)&cli_addr, &addr_len)) < 0) {
3350 if (send(new_fd, "\0\0", 2, 0) < 0) {
3358 new_conn->sockfd = new_fd;
3368 inet_ntoa(cli_addr.sin_addr), new_fd);
3370 return new_fd;
3719 int conn_fd, new_fd; // socket fd
3818 if ((new_fd = establish_connection(conn_fd)) < 0)
3826 fd_in_use[new_fd] = 1;
3827 FD_SET(new_fd, &master_fds);
3828 fdmax = new_fd > fdmax ? new_fd : fdmax;