Lines Matching defs:sockfd
54 static int sockfd = -1;
190 if (send_token(&sockfd, &out_buf) < 0) {
195 if (recv_token(sockfd, &in_buf) < 0) {
357 if (send_token(&sockfd, &send_tok) < 0) {
385 if (recv_token(sockfd, &recv_tok) < 0) {
507 connect_timeout(int sockfd, struct sockaddr *name, int namelen)
516 flags = fcntl(sockfd, F_GETFL, 0);
517 if (fcntl(sockfd, F_SETFL, flags | O_NONBLOCK) == -1) {
520 if (connect(sockfd, name, namelen)) {
526 fds.fd = sockfd;
541 if (getpeername(sockfd, (struct sockaddr *)&addr,
762 if (sockfd != -1) {
776 if (sockfd == -1) {
779 if (!sock_prepare(&sockfd, current_host, err_rsn)) {
811 /* let the recv thread poll() on the sockfd */
814 if (!init_poll(sockfd)) {
910 if (send_token(&sockfd, &out_buf) < 0) {
1314 if (sockfd == -1) {
1319 (void) close(sockfd);
1320 sockfd = -1;
1369 if (sockfd != -1) {
1370 DPRINT((dfile, "Closing socket: %d\n", sockfd));
1371 (void) close(sockfd);
1372 sockfd = -1;
1547 if (send_token(&sockfd, &out_buf) < 0) {