Moved to GUACIO structure, rather than file descriptors (buffering).

This commit is contained in:
Michael Jumper
2010-09-05 14:08:55 -07:00
parent 0b01aa05c5
commit f8c954c83b
3 changed files with 71 additions and 53 deletions

View File

@@ -4,8 +4,22 @@
#include <unistd.h>
ssize_t write_base64(int fd, const void* buf, size_t count);
ssize_t flush_base64(int fd);
typedef struct GUACIO {
int fd;
int ready;
int ready_buf[3];
int written;
char out_buf[8192];
} GUACIO;
GUACIO* guac_open(int fd);
ssize_t write_base64(GUACIO* io, const void* buf, size_t count);
ssize_t flush_base64(GUACIO* io);
void guac_close(GUACIO* io);
#endif