debugging...

This commit is contained in:
Dave Griffiths 2009-07-27 09:50:07 +01:00
parent 409d3c6690
commit c3b62fac83
3 changed files with 6 additions and 5 deletions

View file

@ -37,13 +37,13 @@
(send jab send-msg plant (send msg to-string))))
recipients))
(define (heir-send from l)
(define (heir-send to l)
(for-each
(lambda (msg)
(cond ((not (list? msg))
(send-msg (list from) msg))
(send-msg (list to) msg))
(else
(heir-send msg))))
(heir-send to msg))))
l))
(define (fetch-messages l game-logic)

View file

@ -5,7 +5,7 @@
; a class which wraps the xmpp in a thread and allows messages to be picked up
; and sent by the game
(define debug-netloop #t)
(define debug-netloop #f)
(define jabberer%
(class object%
@ -53,7 +53,7 @@
(let loop ()
(when debug-netloop (printf ".~n"))
(when (not (null? outgoing))
(when debug-jab (printf "tx ----> ~a ~a~n" (car (car outgoing)) (cadr (car outgoing))))
#;(when debug-jab (printf "tx ----> ~a ~a~n" (car (car outgoing)) (cadr (car outgoing))))
(xmpp:send (xmpp:message (car (car outgoing)) (cadr (car outgoing))))
(set! outgoing (cdr outgoing)))
(sleep 0.1)

View file

@ -335,6 +335,7 @@
(thread (lambda ()
(let loop ()
(parse-xmpp-response (read-async in))
;(printf "hello~n")
(sleep 0.1) ;; slight delay to avoid a tight loop
(loop)))))