hoaproject / Websocket

The Hoa\Websocket library.
https://hoa-project.net/
423 stars 75 forks source link

Https Symfony2 #55

Closed atrimech closed 8 years ago

atrimech commented 9 years ago

Hi all, Does this bundle support ssl certificate ?

I have create my server push, when i communicate my app with the server via http, its work perfectly. But it's not the case with https !

What can i do ? i use Mamp Pro on localhost, this is the url of my app, https://ispace:8890/admin/ . Thanks

Hywan commented 9 years ago

@medooch Hello :-). Yes, since Hoa\Socket supports encryption, but there is several under-review PRs (#44 & co.) to ease this usage (with wss:// directly). If you can wait 1 week maximum, you will have this feature automatically.

atrimech commented 9 years ago

Hi hywan, This is my connection to server push var host = 'wss://...:port'; Try{ socket = new WebSocket(host); // } catch(e){ console.log(e); }

this is the error that ive got WebSocket connection to 'wss://...:port' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED

Hywan commented 9 years ago

@medooch How your server looks like?

Hywan commented 9 years ago

See https://github.com/hoaproject/Websocket/issues/51 too.

atrimech commented 9 years ago

@Hywan this is the url of my server : http://push.accessleader.com/WebSocket/, my server push is run successfuly with http, but it's not with https : https://push.accessleader.com/WebSocket/# .

Hywan commented 9 years ago

@medooch You have two sides to consider:

  1. The client, which is written in Javascript in your cases, and use ws:// and wss:// schemes,
  2. The server, which is written in… PHP I guess? And I guess with Hoa\Websocket? Hoa\Websocket is a PHP library to write Websocket clients and servers.

Your client seems correct. What about your server? Can we some information on it?