Skip to content

Commit

Permalink
Updated example
Browse files Browse the repository at this point in the history
Bug fixes
Readme update
  • Loading branch information
pmill committed Jul 9, 2015
1 parent 944927d commit ad57e3c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ example/chat.js with the host name (or ip address) of the server you ran the pre
Version History
---------------

0.2.0 (09/07/2015)

* Separated server and output into separate classes
* Added user defined message logging

0.1.0 (08/07/2015)

* First public release of php-chat
Expand Down
5 changes: 2 additions & 3 deletions example/server.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php
require_once "../vendor/autoload.php";
require_once "ExampleServer.php";
require_once __DIR__."/../vendor/autoload.php";

$port = 9911;
$server = new \pmill\Chat\BasicMultiRoomServer;

\pmill\Chat\MultiRoomServer::run($server, $port);
\pmill\Chat\BasicMultiRoomServer::run($server, $port);
4 changes: 2 additions & 2 deletions src/pmill/Chat/AbstractMultiRoomServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ abstract class AbstractMultiRoomServer implements MessageComponentInterface
const PACKET_TYPE_USER_LIST = 'list-users';

/**
* @param MultiRoomServer $chatServer
* @param AbstractMultiRoomServer $chatServer
* @param int $port
* @param string $ip
* @return IoServer
*/
public static function run(MultiRoomServer $chatServer, $port, $ip='0.0.0.0')
public static function run(AbstractMultiRoomServer $chatServer, $port, $ip='0.0.0.0')
{
$wsServer = new WsServer($chatServer);
$http = new HttpServer($wsServer);
Expand Down

0 comments on commit ad57e3c

Please sign in to comment.