groworld/comm
2009-06-10 16:38:49 +02:00
..
examples.scm sending unintelligable messages over jabber 2009-04-20 17:21:38 +01:00
mod_mycelium.erl misc/minor 2009-06-10 16:38:49 +02:00
README first pass at XMPP for communication 2009-03-28 11:47:22 +01:00
xmpp.ss more jabber 2009-04-21 09:59:14 +01:00

Various parts of the groworld multplayer communcation infrastructure
preliminary notes can be found online at -> 
http://lib.fo.am/groworld_multiplayer_prototype#network_protocol

;; exmaple chat client

(require "xmpp.scm")

(define (read-input prompt)
  (display prompt)
  (read-line (current-input-port)))

(define (chat)
  (let ((jid  (read-input "jid: "))
        (pass (read-input "password: "))
        (to   (read-input "chat with: ")))
    (with-xmpp-session jid pass 
                       (set-xmpp-handler 'message print-message)
                       (let loop ()                         
                         (let ((msg (read-line (current-input-port))))
                           (send (message to msg))
                           (loop))))))