Using wss with Gorilla github.com/gorilla/websocket

1,385 views
Skip to first unread message

Johann Höchtl

unread,
Jun 19, 2016, 1:49:33 PM6/19/16
to golang-nuts
It was straightforward to get go with Gorilla Websocket. However how can I switch to a secure wss connection now?

I am also currently serving from a plain IP without DNS, in order to go wss am I required to have a named address?

Thank you!

Shawn Milochik

unread,
Jun 19, 2016, 2:01:52 PM6/19/16
to golang-nuts
You will need a domain name for WSS/TLS.

The difference between WS and WSS is as simple as using ListenAndServeTLS instead of ListenAndServe. You can even  have an 'if' statement to serve either, so you can more easily test during development.



Reply all
Reply to author
Forward
0 new messages