Permalink
Browse files

use Cappuccino runloop to send events

  • Loading branch information...
1 parent 17fbf21 commit ea24ed10ea0fb86be46279d62abbed5a1b7bd3c3 Antoine Mercadal committed Nov 12, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 TNStropheConnection.j
View
7 TNStropheConnection.j
@@ -336,10 +336,15 @@
*/
- (void)send:(TNStropheStanza)aStanza
{
+ [[CPRunLoop currentRunLoop] performSelector:@selector(performSend:) target:self argument:aStanza order:0 modes:[CPDefaultRunLoopMode]];
+}
+
+- (void)performSend:(TNStropheStanza)aStanza
+{
CPLog.trace("StropheCappuccino Stanza Send:")
CPLog.trace(aStanza);
-
_connection.send([aStanza tree]);
+ [self flush];
}
/*! publish a PEP payload

0 comments on commit ea24ed1

Please sign in to comment.