amphp / websocket-server

WebSocket component for PHP based on the Amp HTTP server.
MIT License
114 stars 17 forks source link

What package to use ? #12

Closed Ekstazi closed 3 years ago

Ekstazi commented 5 years ago

What package i must use for websocket server ? this or aerys ? What's the difference between aerys ?

PeeHaa commented 5 years ago

Aerys is not supported anymore. For any new developments use this package.

trowski commented 5 years ago

Apologies for not tagging a current release, there's quite a bit of changes in master. That being said, v1.x should work well with http-server v1.x. Master will be changing soon to use socket v1.0 and http-server 2.0, both of which have not been tagged yet, but soon.

Ekstazi commented 5 years ago

I tried both versions yesterday but both have a problem with disconnect. I don't have much time yet to provide issue and PR...

PeeHaa commented 5 years ago

I tried both versions yesterday but both have a problem with disconnect. I don't have much time yet to provide issue and PR...

Without any more info nobody will be able to help you or provide support.

bwoebi commented 5 years ago

At very least you could try to describe the exhibited behaviour

Ekstazi commented 5 years ago
  1. I connected to server with client library, initiate some data exchange
  2. I press f5 in browser for 1 or 2 times
  3. Server fail with error like cannot call close on null in detached socket class

This bug reproduces in both versions.

kelunik commented 5 years ago

I guess it's related to https://github.com/amphp/websocket/pull/4/files?

trowski commented 5 years ago

@kelunik Yes, and I think I shouldn't have nulled the encapsulated socket here https://github.com/amphp/http-server/blob/master/src/Driver/Internal/DetachedSocket.php#L43-L48

It's been fixed already in the v2.x branch since the class changed significantly, but I'll fix it in master as well.

EDIT: Perhaps it's because this assert is poorly placed?

Ekstazi commented 5 years ago

I installed websocket-server dev-master by composer. May be I also need to install custom http-server version?

remorhaz commented 5 years ago

Both websocket-server and websocket-client work great in my project, I hope the new versions will be tagged in both projects soon. Thanks for the great job!

trowski commented 4 years ago

v2.0.0-rc1 has been tagged. Please test and provide feedback! Thank you!

elovin commented 4 years ago

@trowski when do you think you will release v2 ?

trowski commented 4 years ago

@elovin Very soon after tagging v2 of http-server (which should be any day now).

trowski commented 4 years ago

I tagged v2.0.0-rc2 that uses v2.0.0 of http-server. Assuming this RC has no major issues, I'll tag a final soon.

remorhaz commented 4 years ago

Thank you very much! I have already upgraded, and I hope you'll tag the client soon, too - it still locks me at http-server RC2.