Lines Matching refs:connection
140 int connection = socket(AF_INET, SOCK_DGRAM, 0);
141 if (connection < 0) {
152 if (sendto(connection, (char *)&message, sizeof(ntp_data),
156 close(connection);
162 FD_SET(connection, &waitForReceived);
169 if (select(connection + 1, &waitForReceived, NULL, NULL, &timeout) <= 0) {
172 close(connection);
179 if (recvfrom(connection, (char *)&message, sizeof(ntp_data), 0,
183 close(connection);
187 close(connection);