diff src/lib/ostream-internal.h @ 2421:d141e1bfdd63 HEAD

We never do blocking reads/writes to network anymore. Changed imap and pop3 processes to use a single I/O loop. Not much tested yet, and currently LIST/LSUB may eat too much memory and APPEND eats all CPU.
author Timo Sirainen <tss@iki.fi>
date Sun, 15 Aug 2004 06:40:30 +0300
parents fd8888f6f037
children 02c0b8d532c2
line wrap: on
line diff
--- a/src/lib/ostream-internal.h	Sun Aug 15 05:54:47 2004 +0300
+++ b/src/lib/ostream-internal.h	Sun Aug 15 06:40:30 2004 +0300
@@ -9,16 +9,20 @@
 	struct _iostream iostream;
 
 /* methods: */
-	void (*cork)(struct _ostream *stream);
+	void (*cork)(struct _ostream *stream, int set);
 	int (*flush)(struct _ostream *stream);
-	int (*have_space)(struct _ostream *stream, size_t size);
+	size_t (*get_used_size)(struct _ostream *stream);
 	int (*seek)(struct _ostream *stream, uoff_t offset);
-	ssize_t (*send)(struct _ostream *stream, const void *data, size_t size);
+	ssize_t (*sendv)(struct _ostream *stream, const struct const_iovec *iov,
+			 size_t iov_count);
 	off_t (*send_istream)(struct _ostream *outstream,
 			      struct istream *instream);
 
 /* data: */
 	struct ostream ostream;
+
+	io_callback_t *callback;
+	void *context;
 };
 
 struct ostream *_o_stream_create(struct _ostream *_stream, pool_t pool);