Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "cboden/ratchet"
"name": "minifets/ratchet"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forget to remove this diff :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I added the changes after the submiting pull request.

, "type": "library"
, "description": "PHP WebSocket library"
, "keywords": ["WebSockets", "Server", "Ratchet", "Sockets", "WebSocket"]
Expand Down
5 changes: 3 additions & 2 deletions src/Ratchet/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ class App {
* @param int $port Port to listen on. If 80, assuming production, Flash on 843 otherwise expecting Flash to be proxied through 8843
* @param string $address IP address to bind to. Default is localhost/proxy only. '0.0.0.0' for any machine.
* @param LoopInterface $loop Specific React\EventLoop to bind the application to. null will create one for you.
* @param array $context
*/
public function __construct($httpHost = 'localhost', $port = 8080, $address = '127.0.0.1', LoopInterface $loop = null) {
public function __construct($httpHost = 'localhost', $port = 8080, $address = '127.0.0.1', LoopInterface $loop = null, $context = array()) {
if (extension_loaded('xdebug')) {
trigger_error('XDebug extension detected. Remember to disable this if performance testing or going live!', E_USER_WARNING);
}
Expand All @@ -73,7 +74,7 @@ public function __construct($httpHost = 'localhost', $port = 8080, $address = '1
$this->httpHost = $httpHost;
$this->port = $port;

$socket = new Reactor($address . ':' . $port, $loop);
$socket = new Reactor($address . ':' . $port, $loop, $context);

$this->routes = new RouteCollection;
$this->_server = new IoServer(new HttpServer(new Router(new UrlMatcher($this->routes, new RequestContext))), $socket, $loop);
Expand Down