diff --git a/CHANGELOG.md b/CHANGELOG.md index 672237d..a2fc038 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,11 @@ CHANGELOG --- -* 0.4 (2017-) +* 0.4 (2017-09-14) * BC: $conn->WebSocket->request replaced with $conn->httpRequest which is a PSR-7 object * Binary messages now supported via Ratchet\WebSocket\MessageComponentInterface * Added heartbeat support via ping/pong in WsServer - * TLS now supported * BC: No longer support old (and insecure) Hixie76 and Hybi protocols * BC: No longer support disabling UTF-8 checks * BC: The Session component implements HttpServerInterface instead of WsServerInterface diff --git a/src/Ratchet/App.php b/src/Ratchet/App.php index b5d7fa6..c119d41 100644 --- a/src/Ratchet/App.php +++ b/src/Ratchet/App.php @@ -60,9 +60,8 @@ 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 $sslContext An array of PHP stream context options in order to support SSL */ - public function __construct($httpHost = 'localhost', $port = 8080, $address = '127.0.0.1', LoopInterface $loop = null, array $sslContext = null) { + public function __construct($httpHost = 'localhost', $port = 8080, $address = '127.0.0.1', LoopInterface $loop = null) { if (extension_loaded('xdebug')) { trigger_error('XDebug extension detected. Remember to disable this if performance testing or going live!', E_USER_WARNING); } @@ -76,10 +75,6 @@ class App { $socket = new Reactor($address . ':' . $port, $loop); - if (is_array($sslContext)) { - $socket = new SecureReactor($socket, $loop, $sslContext); - } - $this->routes = new RouteCollection; $this->_server = new IoServer(new HttpServer(new Router(new UrlMatcher($this->routes, new RequestContext))), $socket, $loop); diff --git a/src/Ratchet/Server/IoServer.php b/src/Ratchet/Server/IoServer.php index f64c960..b3fb7e0 100644 --- a/src/Ratchet/Server/IoServer.php +++ b/src/Ratchet/Server/IoServer.php @@ -52,15 +52,11 @@ class IoServer { * @param \Ratchet\MessageComponentInterface $component The application that I/O will call when events are received * @param int $port The port to server sockets on * @param string $address The address to receive sockets on (0.0.0.0 means receive connections from any) - * @param array $sslContext An array of PHP stream context options in order to support SSL * @return IoServer */ - public static function factory(MessageComponentInterface $component, $port = 80, $address = '0.0.0.0', array $sslContext = null) { + public static function factory(MessageComponentInterface $component, $port = 80, $address = '0.0.0.0') { $loop = LoopFactory::create(); $socket = new Reactor($address . ':' . $port, $loop); - if (is_array($sslContext)) { - $socket = new SecureReactor($socket, $loop, $sslContext); - } return new static($component, $socket, $loop); }