amphp/websocket-server

Please could you tag a version

assertchris opened this issue · 6 comments

First off, thanks for this library. I used it, with consummate ease, to implement a ludicrous thing.

The reason I'm asking is because it's currently not possible to use without dropping minimum stability levels. Unless I'm overlooking something besides locking to a SHA...

Hey, thanks!

I'm not totally happy with the nameing of beforeOnStart / afterOnStart / beforeOnStop / afterOnStop, other than that it's ready for v1.0.0, I guess.

Any suggestions?

Without making onStart() / onStop() final, I fear many people will forget to call the parent method and will wonder what's wrong and loose quite some time there.

How about beforeStart, afterStart, beforeStop, and afterStop..? onX is just the exact point in time, and beforeX and afterX follow the same pattern.

I thought about that as well, but when afterOnStart is called, the server is still starting and not started, yet.

I implemented a check in handleRequest now, throwing if the user overrides onStart() but doesn't call parent::onStart(). I think it's fine now.

That seems like a fine solution.

Thank you for the quick turn-around!