forked from orthecreedence/wookie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
listener-ssl.lisp
24 lines (21 loc) · 920 Bytes
/
listener-ssl.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(in-package :wookie)
(defclass ssl-listener (listener)
((certificate :accessor listener-certificate :initarg :certificate :initform nil)
(key :accessor listener-key :initarg :key :initform nil)
(password :accessor listener-password :initarg :password :initform nil))
(:documentation "Describes an HTTPS listener."))
(defmethod start-server ((listener ssl-listener))
;; start the async SSL server
(wlog :notice "(start) Starting Wookie (SSL) ~a:~a~%"
(if (listener-bind listener)
(listener-bind listener)
"0.0.0.0")
(listener-port listener))
(as-ssl:tcp-ssl-server (listener-bind listener) (listener-port listener)
'read-data
'listener-event-handler
:connect-cb 'handle-connection
:certificate (listener-certificate listener)
:key (listener-key listener)
:password (listener-password listener)
:backlog (listener-backlog listener)))