diff options
author | Markus Fischer <mfischer@php.net> | 2002-01-02 14:58:17 +0000 |
---|---|---|
committer | Markus Fischer <mfischer@php.net> | 2002-01-02 14:58:17 +0000 |
commit | 9bde60d1487f9108ab6bd2595c12afe542082782 (patch) | |
tree | a1bdf03bb71fc582d7fdb4d2c0dac24f9b7b7309 /ext/ftp/ftp.h | |
parent | 8e6a16984a29c16acefbe1af7f6b2d7b2cf2d1ed (diff) | |
download | php-git-9bde60d1487f9108ab6bd2595c12afe542082782.tar.gz |
- Added ftp_set_option(), ftp_get_option() and support for setting a
custom timeout.
# Adding custom buffer size would be next, no promises though.
Diffstat (limited to 'ext/ftp/ftp.h')
-rw-r--r-- | ext/ftp/ftp.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h index 8cd6c2f704..9546e53c44 100644 --- a/ext/ftp/ftp.h +++ b/ext/ftp/ftp.h @@ -27,9 +27,10 @@ #include <netinet/in.h> #endif -/* XXX these should be configurable at runtime XXX */ +#define FTP_DEFAULT_TIMEOUT 90 + +/* XXX this should be configurable at runtime XXX */ #define FTP_BUFSIZE 4096 -#define FTP_TIMEOUT 90 typedef enum ftptype { FTPTYPE_ASCII, @@ -50,6 +51,7 @@ typedef struct ftpbuf ftptype_t type; /* current transfer type */ int pasv; /* 0=off; 1=pasv; 2=ready */ struct sockaddr_in pasvaddr; /* passive mode address */ + long timeout_sec; /* User configureable timeout (seconds) */ } ftpbuf_t; typedef struct databuf @@ -64,7 +66,7 @@ typedef struct databuf /* open a FTP connection, returns ftpbuf (NULL on error) * port is the ftp port in network byte order, or 0 for the default */ -ftpbuf_t* ftp_open(const char *host, short port); +ftpbuf_t* ftp_open(const char *host, short port, long timeout_sec); /* quits from the ftp session (it still needs to be closed) * return true on success, false on error |