Skip to content
Advertisement

Closing a Ratchet IOServer

Is there a method of terminating IOServer‘s loop?

I’m using WebSockets as a hacky inter-app communication system (believe me, if I could use anything else, I would), but I can’t break out of the loop and continue my application after calling run() on IOServer.

Do I need to subclass IOServer into TerminatableIOServer or does this feature already exist?

Advertisement

Answer

Call stop() on the IOServer‘s loop.

Launcher.php

JavaScript

Server.php

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement