Closed dominics closed 7 years ago
Fixes #77
Adds a LoopInterface, which consists of the single method shouldContinue(): bool. Set the loop on the server with $server->setLoop(LoopInterface $loop) at any point before you call $server->run().
LoopInterface
shouldContinue(): bool
$server->setLoop(LoopInterface $loop)
$server->run()
Includes a test example which is a loop interface configured to only loop five times: https://github.com/dominics/Wrench/blob/1851fc039338edece476e8606085e260627fa8af/test/ServerTest.php#L48L59
Fixes #77
Adds a
LoopInterface
, which consists of the single methodshouldContinue(): bool
. Set the loop on the server with$server->setLoop(LoopInterface $loop)
at any point before you call$server->run()
.Includes a test example which is a loop interface configured to only loop five times: https://github.com/dominics/Wrench/blob/1851fc039338edece476e8606085e260627fa8af/test/ServerTest.php#L48L59