Kobey Rafferty
Kobey Rafferty

Reputation: 37

Communicating between Java SSLSocket and HTML5

Just a quick question, can I use SSL in html5 with websockets to communicate with my java server that is using SSLSockets?

I have been trying to connect using another java client using ssl sockets, which works, but I have not tried to do it through html5. Is it even possible?

For the record, I am using github pages to host my server, and I have a custom domain provided by Namecheap and an SSL certificate from Comodo.

Is it even possible to communicate between java and html5 using SSL?

Upvotes: 1

Views: 145

Answers (1)

Steffen Ullrich
Steffen Ullrich

Reputation: 123521

WebSockets are not the same as "normal" TCP sockets but instead a protocol layer on top of TCP. And thus WebSockets over SSL can not communicate directly with SSLSockets. To communicate with WebSockets (with or without SSL) you would need a library implementing the WebSocket protocol.

Upvotes: 2

Related Questions