paragi / PHP-websocket-client

142 stars 60 forks source link

[Bug] `persistant` set to true for basic example #6

Closed NabiKAZ closed 4 years ago

NabiKAZ commented 4 years ago

I see in the basic example, the persistant param must be true about echo.websocket.org sample server for works it.

https://github.com/paragi/PHP-websocket-client/blob/cefdf416d96d01733bd6e62b9ba0ddbbe5888e96/example1.php#L7

NabiKAZ commented 4 years ago

I created a PR https://github.com/paragi/PHP-websocket-client/pull/7

paragi commented 4 years ago

Thanks for your contribution. It is appreciated.

NabiKAZ commented 4 years ago

@paragi About latest commit: https://github.com/paragi/PHP-websocket-client/commit/2701bd60ec8de3701d503e9f21f7d54622428b31#diff-4ca99799013cf187846f3e325110c2f3L7 I see you come back changed persistant param of example to false and it don't works for echo.websocket.org server. Please test the example again.

paragi commented 4 years ago

I get this:

$ php example.php 

Connecting to server: echo.websocket.org 
Sending message to server: 'hello server' 
Server responed with: 'hello server'

What do you get? (know that there was a bug in a previous PR, that I just fixed)

NabiKAZ commented 4 years ago

Yes, that's works for now. Thanks.