82 if ((outfd=fopen(filename,
"wb")) ==
NULL)
84 cerr <<
"socket_receive_file: can't find file \"" <<
92 c = getc_unbuffered(fd);
120 cerr <<
"Error opening file" << endl;
123 FILE *ffd = fdopen(dupfd,
"wb");
128 if ((infd=fopen(filename,
"rb")) ==
NULL)
130 cerr <<
"socket_send_file: can't find file \"" <<
140 while ((c=getc(infd)) != EOF)
149 const char filler=
'X';
150 send(fd,&filler,1,0);
157 send(fd,(
const char *)&c,1,0);
Utility IO Function header file.
const char * file_stuff_key
int socket_receive_file(SOCKET_FD fd, const EST_String &filename)
int socket_send_file(SOCKET_FD fd, const EST_String &filename)