Skip to content

Instantly share code, notes, and snippets.

Avatar

Pat Patterson metadaddy

View GitHub Profile
@metadaddy
metadaddy / server.c
Created Jul 23, 2012 — forked from anonymous/server.c
sendfile
View server.c
/* receive e-mail */
void receive_mail(char *filename, int sock_fd)
{
/* file descriptor for destination file */
int destination_fd;
/* byte offset used by sendfile */
off_t offset = 0;