#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <sys/select.h>#include <sys/socket.h>#include <sys/uio.h>#include <atalk/adouble.h>#include <atalk/logger.h>#include <atalk/util.h>Macros | |
| #define | TRANSFER_BUF_SIZE (128*1024) |
Functions | |
| static int | ad_recvfile_init (const struct adouble *ad, int eid, off_t *off) |
| static ssize_t | default_sys_recvfile (int fromfd, int tofd, off_t offset, size_t count) |
| static int | waitfordata (int socket) |
| static ssize_t | sys_recvfile (int fromfd, int tofd, off_t offset, size_t count, int splice_size) |
| ssize_t | ad_recvfile (struct adouble *ad, int eid, int sock, off_t off, size_t len, int splice_size) |
| #define TRANSFER_BUF_SIZE (128*1024) |
| ssize_t ad_recvfile | ( | struct adouble * | ad, |
| int | eid, | ||
| int | sock, | ||
| off_t | off, | ||
| size_t | len, | ||
| int | splice_size ) |
read from a socket and write to an adouble file
|
static |
|
static |
If tofd is -1, drain the incoming socket of count bytes without writing to the outgoing fd, if a write fails we do the same.
Returns -1 on short reads from fromfd (read error) and sets errno.
Returns number of bytes written to 'tofd' or thrown away if 'tofd == -1'. return != count then sets errno. Returns count if complete success.
|
static |
|
static |