debugging...
This commit is contained in:
parent
409d3c6690
commit
c3b62fac83
3 changed files with 6 additions and 5 deletions
|
@ -37,13 +37,13 @@
|
||||||
(send jab send-msg plant (send msg to-string))))
|
(send jab send-msg plant (send msg to-string))))
|
||||||
recipients))
|
recipients))
|
||||||
|
|
||||||
(define (heir-send from l)
|
(define (heir-send to l)
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (msg)
|
(lambda (msg)
|
||||||
(cond ((not (list? msg))
|
(cond ((not (list? msg))
|
||||||
(send-msg (list from) msg))
|
(send-msg (list to) msg))
|
||||||
(else
|
(else
|
||||||
(heir-send msg))))
|
(heir-send to msg))))
|
||||||
l))
|
l))
|
||||||
|
|
||||||
(define (fetch-messages l game-logic)
|
(define (fetch-messages l game-logic)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
; a class which wraps the xmpp in a thread and allows messages to be picked up
|
; a class which wraps the xmpp in a thread and allows messages to be picked up
|
||||||
; and sent by the game
|
; and sent by the game
|
||||||
|
|
||||||
(define debug-netloop #t)
|
(define debug-netloop #f)
|
||||||
|
|
||||||
(define jabberer%
|
(define jabberer%
|
||||||
(class object%
|
(class object%
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
(let loop ()
|
(let loop ()
|
||||||
(when debug-netloop (printf ".~n"))
|
(when debug-netloop (printf ".~n"))
|
||||||
(when (not (null? outgoing))
|
(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))))
|
(xmpp:send (xmpp:message (car (car outgoing)) (cadr (car outgoing))))
|
||||||
(set! outgoing (cdr outgoing)))
|
(set! outgoing (cdr outgoing)))
|
||||||
(sleep 0.1)
|
(sleep 0.1)
|
||||||
|
|
|
@ -335,6 +335,7 @@
|
||||||
(thread (lambda ()
|
(thread (lambda ()
|
||||||
(let loop ()
|
(let loop ()
|
||||||
(parse-xmpp-response (read-async in))
|
(parse-xmpp-response (read-async in))
|
||||||
|
;(printf "hello~n")
|
||||||
(sleep 0.1) ;; slight delay to avoid a tight loop
|
(sleep 0.1) ;; slight delay to avoid a tight loop
|
||||||
(loop)))))
|
(loop)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue