Back to index

courier  0.68.2
proxy.h
Go to the documentation of this file.
00001 #ifndef       proxy_h
00002 #define       proxy_h
00003 
00004 /*
00005 ** Copyright 2004 Double Precision, Inc.
00006 ** See COPYING for distribution information.
00007 */
00008 
00009 
00010 struct proxyinfo {
00011        const char *host;
00012        int port;
00013 
00014        int (*connected_func)(int, const char *, void *);
00015        void *void_arg;
00016 };
00017 
00018 int connect_proxy(struct proxyinfo *);
00019 void proxyloop(int);
00020 
00021 struct proxybuf {
00022        char buffer[256];
00023        char *bufptr;
00024        size_t bufleft;
00025 };
00026 
00027 int proxy_readline(int fd, struct proxybuf *pb,
00028                  char *linebuf,
00029                  size_t linebuflen,
00030                  int imapmode);
00031 int proxy_write(int fd, const char *hostname,
00032               const char *buf, size_t buf_len);
00033 
00034 #endif