Extend net_sendbuffer by adding a LINEBUF_REC member and a net_sendbuffer_receive_line

function to read linewise from the associated io channel.
Rewrite irc/dcc/proxy read logic on top of it.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4841 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-05-22 22:38:29 +00:00 committed by exg
commit f053542dcf
12 changed files with 33 additions and 50 deletions

View file

@ -6,6 +6,7 @@
struct _NET_SENDBUF_REC {
GIOChannel *handle;
LINEBUF_REC *readbuffer; /* receive buffer */
int send_tag;
int bufsize;
@ -26,6 +27,8 @@ void net_sendbuffer_destroy(NET_SENDBUF_REC *rec, int close);
occured. */
int net_sendbuffer_send(NET_SENDBUF_REC *rec, const void *data, int size);
int net_sendbuffer_receive_line(NET_SENDBUF_REC *rec, char **str, int read_socket);
/* Flush the buffer, blocks until finished. */
void net_sendbuffer_flush(NET_SENDBUF_REC *rec);