Lines Matching defs:sd
76 inet_connect(int *sd, const struct source *src, const char *host,
84 if (*sd != -1)
85 close(*sd);
89 if ((*sd = socket(src->family, SOCK_STREAM | SOCK_NONBLOCK, 0))
95 if (inet_bind(*sd, src->family, bsrc, bsrcsz) == -1) {
105 if ((c = connect(*sd, (const struct sockaddr *)&src->sa, src->salen))
107 pfd.fd = *sd;
112 if ((c = getsockopt(*sd, SOL_SOCKET, SO_ERROR, &optval,
289 rsync_connect(const struct opts *opts, int *sd, const struct fargs *f)
333 c = inet_connect(sd, &src[i], f->host, bsrc, bsrcsz);
361 if (*sd != -1)
362 close(*sd);
372 rsync_socket(const struct opts *opts, int sd, const struct fargs *f)
396 if (!io_write_line(&sess, sd, buf)) {
403 if (!io_write_line(&sess, sd, f->module)) {
418 if (!io_read_byte(&sess, sd, &byte)) {
459 if (!io_write_line(&sess, sd, args[i])) {
463 if (!io_write_byte(&sess, sd, '\n')) {
475 if (!io_read_int(&sess, sd, &sess.seed)) {
499 if (!rsync_receiver(&sess, sd, sd, f->sink)) {
506 if (io_read_check(&sess, sd))