imanel / websocket-ruby

Universal Ruby library to handle WebSocket protocol
447 stars 43 forks source link

ssl support? #13

Closed zh99998 closed 11 years ago

zh99998 commented 11 years ago

does websocket-ruby support websocket over ssl?

imanel commented 11 years ago

Yes it is.

If you are creating client handshake then simply provide valid protocol(ws:// or wss://) and websocket-ruby will automatically detect whenever it should send headers appropriate headers or not.

For server you need to pass :secure => true option and it will do the same.

Please remember that WebSocket protocol is providing only minimal support for SSL connection - you will need to handle encryption yourself when building server/client or prepare proxy that will do it for you.

zh99998 commented 11 years ago

thanks