PageRenderTime 1ms CodeModel.GetById 102ms app.highlight 1ms RepoModel.GetById 40ms app.codeStats 0ms

/examples/service-provider/server.lisp

http://github.com/skypher/cl-oauth
Lisp | 17 lines | 11 code | 6 blank | 0 comment | 0 complexity | 6a26c493977c12f1c9c6db386ddb1f8e MD5 | raw file
 1
 2(in-package :oauth)
 3
 4(export '(start-server stop-server))
 5
 6(defvar *server* nil)
 7
 8(defun start-server (&rest acceptor-args)
 9  (setf oauth:*request-adapter* (oauth:make-hunchentoot-request-adapter))
10  (if *server*
11    (warn "Server already started, doing nothing.")
12    (hunchentoot:start (apply #'make-instance 'hunchentoot:acceptor acceptor-args))))
13
14(defun stop-server ()
15  (when *server*
16    (hunchentoot:stop *server*)))
17