Mercurial > pidgin.yaz
comparison libpurple/protocols/bonjour/jabber.h @ 17796:6e4e2d234c3a
Update Bonjour to do nonblocking I/O correctly.
This also includes a number of error handling bugfixes (and various other improvements).
This doesn't handle the scenario where a partial message is read - I need to figure out how libxml2 handles such a
scenario to fix it correctly.
There are also also a few quirks that I noticed and didn't get around to fixing:
-We don't wait for a "</stream:stream>" from the peer before closing the socket.
-We don't make sure that the peer has sent us the stream start message before starting.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 08 Jun 2007 18:24:23 +0000 |
parents | 612dc5149964 |
children | 316be7e715c6 |
comparison
equal
deleted
inserted
replaced
17795:2af1f8ccd396 | 17796:6e4e2d234c3a |
---|---|
25 | 25 |
26 #ifndef _BONJOUR_JABBER_H_ | 26 #ifndef _BONJOUR_JABBER_H_ |
27 #define _BONJOUR_JABBER_H_ | 27 #define _BONJOUR_JABBER_H_ |
28 | 28 |
29 #include "account.h" | 29 #include "account.h" |
30 #include "circbuffer.h" | |
30 | 31 |
31 typedef struct _BonjourJabber | 32 typedef struct _BonjourJabber |
32 { | 33 { |
33 gint port; | 34 gint port; |
34 gint socket; | 35 gint socket; |
37 } BonjourJabber; | 38 } BonjourJabber; |
38 | 39 |
39 typedef struct _BonjourJabberConversation | 40 typedef struct _BonjourJabberConversation |
40 { | 41 { |
41 gint socket; | 42 gint socket; |
42 gint watcher_id; | 43 guint rx_handler; |
44 guint tx_handler; | |
45 PurpleCircBuffer *tx_buf; | |
43 gboolean stream_started; | 46 gboolean stream_started; |
47 PurpleProxyConnectData *connect_data; | |
48 gpointer stream_data; | |
44 } BonjourJabberConversation; | 49 } BonjourJabberConversation; |
45 | 50 |
46 /** | 51 /** |
47 * Start listening for jabber connections. | 52 * Start listening for jabber connections. |
48 * | 53 * |