[App] Reverted API API changes - back to v0.3.1 version

This commit is contained in:
Chris Boden 2014-06-07 11:06:57 -04:00
parent a0db6e6727
commit 989235132e
2 changed files with 3 additions and 26 deletions

View File

@ -1,7 +1,5 @@
<?php
namespace Ratchet;
use React\EventLoop\LoopInterface;
use React\EventLoop\Factory as LoopFactory;
use React\Socket\Server as Reactor;
@ -77,7 +75,7 @@ class App {
$this->routes = new RouteCollection;
$this->_server = new IoServer(new HttpServer(new Router(new UrlMatcher($this->routes, new RequestContext))), $socket, $loop);
$policy = new FlashPolicy();
$policy = new FlashPolicy;
$policy->addAllowedAccess($httpHost, 80);
$policy->addAllowedAccess($httpHost, $port);
$flashSock = new Reactor($loop);
@ -89,24 +87,6 @@ class App {
$flashSock->listen(8843);
}
}
/**
* Returns the FlashPolicy running in the flash server. Modifications of this object take effect immediately!
*
* @return FlashPolicy
*/
public function getFlashPolicy() {
return $this->flashServer->app;
}
/**
* Returns the FlashSocket of the flash server.
*
* @return \React\Socket\ServerInterface
*/
public function getFlashSocket() {
return $this->flashServer->socket;
}
/**
* Add an endpiont/application to the server
@ -150,5 +130,4 @@ class App {
public function run() {
$this->_server->run();
}
}
}

View File

@ -1,7 +1,5 @@
<?php
namespace Ratchet\Server;
use Ratchet\MessageComponentInterface;
use React\EventLoop\LoopInterface;
use React\Socket\ServerInterface;
@ -28,7 +26,7 @@ class IoServer {
* @var \SplFixedArray
*/
protected $handlers;
/**
* The socket server the Ratchet Application is run off of
* @var \React\Socket\ServerInterface