--- nntp.h 2001/09/10 14:11:33 1.11
+++ nntp.h 2001/10/09 12:08:59 1.12
@@ -38,15 +38,13 @@
typedef struct {
void *ctx;
- int (*select)(void *, int, fd_set *, fd_set *, fd_set *, struct timeval *);
- ssize_t (*read)(void *, int, void *, size_t);
- ssize_t (*write)(void *, int, const void *, size_t);
+ ssize_t (*read)(void *, void *, size_t);
+ ssize_t (*write)(void *, const void *, size_t);
} nntp_io_t;
typedef enum {
NNTP_OK,
NNTP_EOF,
- NNTP_TIMEOUT,
NNTP_DEFER,
NNTP_FAKE,
NNTP_ERR_SYSTEM,
@@ -57,8 +55,11 @@
NNTP_ERR_UNKNOWN
} nntp_rc_t;
-nntp_t *nntp_create (int, int, nntp_io_t *);
-nntp_rc_t nntp_timeout (nntp_t *nntp, long);
+typedef struct {
+ int fd;
+} nntp_fd_t;
+
+nntp_t *nntp_create (nntp_io_t *);
nntp_rc_t nntp_init (nntp_t *);
void nntp_destroy (nntp_t *);
nntp_rc_t nntp_readline (nntp_t *, char *, size_t);
@@ -66,6 +67,8 @@
nntp_rc_t nntp_post (nntp_t *, msg_t *msg);
nntp_rc_t nntp_feed (nntp_t *, msg_t *msg);
char *nntp_error (nntp_rc_t);
+ssize_t nntp_fd_read (void *, void *, size_t);
+ssize_t nntp_fd_write (void *, const void *, size_t);
#endif /* __NNTP_H__ */
|