34 #define netread(fd, ptr, len) read(fd, ptr, len)
35 #define netwrite(fd, ptr, len) write(fd, ptr, len)
36 #define netclose(fd) close(fd)
39 #define netread(fd, ptr, len) recv(fd, ptr, len, 0)
40 #define netwrite(fd, ptr, len) send(fd, ptr, len, 0)
41 #define netclose(fd) closesocket(fd)
46 #define KNF_TYPE_LOCAL 1
47 #define KNF_TYPE_FTP 2
48 #define KNF_TYPE_HTTP 3
65 #define knet_tell(fp) ((fp)->offset)
66 #define knet_fileno(fp) ((fp)->fd)
73 int knet_win32_init();
74 void knet_win32_destroy();
int is_ready
Definition: knetfile.h:56
char * retr
Definition: knetfile.h:57
char * port
Definition: knetfile.h:53
struct knetFile_s knetFile
int no_reconnect
Definition: knetfile.h:56
int pasv_ip[4]
Definition: knetfile.h:56
off_t knet_seek(knetFile *fp, off_t off, int whence)
Definition: knetfile.c:542
int pasv_port
Definition: knetfile.h:56
knetFile * knet_open(const char *fn, const char *mode)
Definition: knetfile.c:461
int ctrl_fd
Definition: knetfile.h:56
int max_response
Definition: knetfile.h:56
int64_t offset
Definition: knetfile.h:52
char * size_cmd
Definition: knetfile.h:57
int fd
Definition: knetfile.h:51
char * response
Definition: knetfile.h:57
int64_t file_size
Definition: knetfile.h:59
int64_t seek_offset
Definition: knetfile.h:58
int type
Definition: knetfile.h:51
char * path
Definition: knetfile.h:62
ssize_t knet_read(knetFile *fp, void *buf, size_t len)
Definition: knetfile.c:513
knetFile * knet_dopen(int fd, const char *mode)
Definition: knetfile.c:505
char * host
Definition: knetfile.h:53
Definition: knetfile.h:50
char * http_host
Definition: knetfile.h:62
int knet_close(knetFile *fp)
Definition: knetfile.c:575