summaryrefslogtreecommitdiff
path: root/ext/ftp/ftp.h
diff options
context:
space:
mode:
authorAndrew Skalski <askalski@php.net>1999-11-18 20:29:32 +0000
committerAndrew Skalski <askalski@php.net>1999-11-18 20:29:32 +0000
commit0cb70ef9bb50d678cc4aefe9086e934aec598438 (patch)
tree588d8f21c307cafab0a0702b03f35d197ff25ffe /ext/ftp/ftp.h
parent111cedbbea8a5d62a163d40adc1de7f4ede7490d (diff)
downloadphp-git-0cb70ef9bb50d678cc4aefe9086e934aec598438.tar.gz
Removed stdio wrapper from sockets; added timeouts to socket ops.
Diffstat (limited to 'ext/ftp/ftp.h')
-rw-r--r--ext/ftp/ftp.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h
index a92c1c9fbe..b202981d9a 100644
--- a/ext/ftp/ftp.h
+++ b/ext/ftp/ftp.h
@@ -37,7 +37,9 @@
#include <netinet/in.h>
+/* XXX these should be configurable at runtime XXX */
#define FTP_BUFSIZE 4096
+#define FTP_TIMEOUT 90
typedef enum ftptype {
FTPTYPE_ASCII,
@@ -46,10 +48,13 @@ typedef enum ftptype {
typedef struct ftpbuf
{
- FILE *fp; /* control connection */
+ int fd; /* control connection */
struct in_addr localaddr; /* local inet address */
int resp; /* last response code */
char inbuf[FTP_BUFSIZE]; /* last response text */
+ char *extra; /* extra characters */
+ int extralen; /* number of extra chars */
+ char outbuf[FTP_BUFSIZE]; /* command output buffer */
char *pwd; /* cached pwd */
char *syst; /* cached system type */
ftptype_t type; /* current transfer type */
@@ -60,8 +65,9 @@ typedef struct ftpbuf
typedef struct databuf
{
int listener; /* listener socket */
- FILE *fp; /* data connection */
+ int fd; /* data connection */
ftptype_t type; /* transfer type */
+ char buf[FTP_BUFSIZE]; /* data buffer */
} databuf_t;