Tuesday, 03 December 2019
  1 Replies
  2.8K Visits
  Subscribe
I try the trial version of websocket library for delphi, and i have a problem.
I need support both http(ws) and https(wss) connections.
The problem is that, if i configure the TsgcWebSocketServer object to use SSL, the http connections is no longer works.
From https is working fine, but if i try to connect from a http page, i get an error message that connection closed before receiving a handshake response. If deactivate SSL, its working from http page.

So the question is, can the TsgcWebSocketServer component serve ws/wss connections simultaneously ?
4 years ago
·
#98
Yes, TsgcWebSocketServer support both http and https connections using same server. You can check in Demos\Chat folder exactly that. By default only none SSL server is active, but if you stop server, check SSL option and run again, you can connect using port 5414 as HTTP and 5415 as HTTPS.
Basically, you must use bindings property to set which ports server will use (for HTTP and HTTPs) and then enable SSL and Set SSL port in Server properties.

You can download another sample which shows the use without HTTP, only with websocket protocol. Is a single server with 2 clients, one ssl and another none ssl.

http://www.esegece.com/download/samples/WebSockets_SSL.zip
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf
· Insert · Remove
  Upload Files (Maximum 10MB)