-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lukaszm-rc
committed
Oct 21, 2015
1 parent
dea3535
commit 30e8fac
Showing
10 changed files
with
989 additions
and
1,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/php | ||
<?php | ||
include "../vendor/autoload.php"; | ||
include "../server/MessageHandler.php"; | ||
|
||
/** | ||
* EventLoop | ||
*/ | ||
$messageHandler = new MessageHandler(); | ||
$server = WebSocket\Server\WebSocketServer::Factory($messageHandler, "127.0.0.1", "8080"); | ||
|
||
/** | ||
* Podobne do setInterval() z Javascriptu | ||
*/ | ||
$server->loop->addPeriodicTimer(5, function () { | ||
echo "+"; | ||
}); | ||
$server->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.