comparison libpurple/protocols/oscar/oscar.h @ 23568:0a674616953c

Added `flap_connection_send_snac_with_priority()`, which allows specifying high versus low priority for the SNAC to be sent. If we are not rate limited, a SNAC is always sent immediately. If we are at or near the rate limit, the SNAC may be queued to be sent when it wouldn't violate a rate limit to do so. Previously, SNACs were always sent in the order requested. A SNAC may now be set to be low priority, in which case other SNACs will be sent first if a queue is in use. This means that even if we have 120 'get ICQ status note' requests in the queue, a 'send message' SNAC can still be sent nearly immediately (rather than after a 10 minute or so delay). `flap_connection_send_snac_()` calls `flap_connection_send_snac_with_priority` with high priority. Get Info requests (including ICQ Status Note requests) are the only low priority SNACs at this time.
author Evan Schoenberg <evan.s@dreskin.net>
date Sun, 20 Jul 2008 05:47:42 +0000
parents 7ec3dce64369
children a73d527731ff 38a30596ff49
comparison
equal deleted inserted replaced
23563:de24d89313b0 23568:0a674616953c
431 guint16 seqnum_in; /**< The sequence number of most recently received packet. */ 431 guint16 seqnum_in; /**< The sequence number of most recently received packet. */
432 GSList *groups; 432 GSList *groups;
433 GSList *rateclasses; /* Contains nodes of struct rateclass. */ 433 GSList *rateclasses; /* Contains nodes of struct rateclass. */
434 434
435 GQueue *queued_snacs; /**< Contains QueuedSnacs. */ 435 GQueue *queued_snacs; /**< Contains QueuedSnacs. */
436 GQueue *queued_lowpriority_snacs; /**< Contains QueuedSnacs to send only once queued_snacs is empty */
436 guint queued_timeout; 437 guint queued_timeout;
437 438
438 void *internal; /* internal conn-specific libfaim data */ 439 void *internal; /* internal conn-specific libfaim data */
439 }; 440 };
440 441
623 void flap_connection_recv_cb(gpointer data, gint source, PurpleInputCondition cond); 624 void flap_connection_recv_cb(gpointer data, gint source, PurpleInputCondition cond);
624 void flap_connection_send(FlapConnection *conn, FlapFrame *frame); 625 void flap_connection_send(FlapConnection *conn, FlapFrame *frame);
625 void flap_connection_send_version(OscarData *od, FlapConnection *conn); 626 void flap_connection_send_version(OscarData *od, FlapConnection *conn);
626 void flap_connection_send_version_with_cookie(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy); 627 void flap_connection_send_version_with_cookie(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy);
627 void flap_connection_send_snac(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data); 628 void flap_connection_send_snac(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data);
629 void flap_connection_send_snac_with_high_priority(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data, gboolean high_priority);
628 void flap_connection_send_keepalive(OscarData *od, FlapConnection *conn); 630 void flap_connection_send_keepalive(OscarData *od, FlapConnection *conn);
629 FlapFrame *flap_frame_new(OscarData *od, guint16 channel, int datalen); 631 FlapFrame *flap_frame_new(OscarData *od, guint16 channel, int datalen);
630 632
631 OscarData *oscar_data_new(void); 633 OscarData *oscar_data_new(void);
632 void oscar_data_destroy(OscarData *); 634 void oscar_data_destroy(OscarData *);