Optional SSL options for broker

This commit is contained in:
Tony Garnock-Jones 2016-06-05 12:06:28 -04:00
parent 9cee74b290
commit 9af4e88681
1 changed files with 6 additions and 0 deletions

View File

@ -115,7 +115,13 @@
(require syndicate/actor)
(require syndicate/drivers/timer)
(require syndicate/drivers/websocket)
(define ssl-options
(match (current-command-line-arguments)
[(vector c p) (websocket-ssl-options c p)]
[_ #f]))
(run-ground (spawn-timer-driver)
(spawn-websocket-driver)
(dataspace (perform-core-action! (spawn-broker-server 8000))
(when ssl-options
(perform-core-action! (spawn-broker-server 8443 #:ssl-options ssl-options)))
(forever))))