2009-04-02 15:49:11 +00:00
|
|
|
#lang scribble/doc
|
|
|
|
@(require scribble/manual)
|
|
|
|
|
|
|
|
@title{Gibberish}
|
|
|
|
|
2009-04-03 08:48:50 +00:00
|
|
|
Gibberish is a module for using the Jabber/XMPP protocol.
|
|
|
|
|
|
|
|
@table-of-contents[]
|
|
|
|
|
|
|
|
@section{Protocol Support}
|
|
|
|
|
|
|
|
It should eventually implement XMPP-Core and XMPP-IM to conform with
|
|
|
|
RFCs 3920 and 3921. Progress toward supporting the full protocol is
|
|
|
|
currently documented in the file 'xmpp.scm'
|
|
|
|
|
|
|
|
@section{Installation}
|
|
|
|
|
|
|
|
(require (planet "xmpp.scm" (zzkt gibberish 1 0)))
|
|
|
|
|
|
|
|
|
|
|
|
@section{Example Chat Client}
|
2009-04-02 15:49:11 +00:00
|
|
|
|
|
|
|
@schemeblock[
|
|
|
|
|
|
|
|
(require xmpp)
|
|
|
|
|
|
|
|
(define (read-input prompt)
|
|
|
|
(display prompt)
|
|
|
|
(read-line (current-input-port)))
|
|
|
|
|
2009-04-03 08:48:50 +00:00
|
|
|
(define (chat)
|
2009-04-02 15:49:11 +00:00
|
|
|
(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))))))
|
|
|
|
]
|
|
|
|
|
2009-04-03 08:48:50 +00:00
|
|
|
and chat away...
|