examples/example-server.scm
(require (planet "roos.scm" ("oesterholt" "roos.plt" 1 0)))
(require "mzrpc.scm")

(rpc-define (plus (a number?) (b number?)) (+ a b))

(def-class 
 (this (my-rpc-server . args))
 (supers (apply rpc-server args))
 (private
  (define _clients (make-hash-table))
  
  (define (notifier c i)
    (sleep 1)
    (-> c notify-client i)
    (notifier c (+ i 1)))
  )
 (public
  (define (client-handler-started client)
    (display "client-handler-started called\n")
    (hash-table-put! _clients client (thread (lambda () 
                                               (notifier client 0)))))
  
  
  (define (client-handler-ended client)
    (display "client-handler-ended called\n")
    (let ((t (hash-table-get _clients client)))
      (kill-thread t)))
  )
 (constructor)
 )



(define S (my-rpc-server 4002 (lambda (user pass chalenge) 'admin)))

(-> S run)