
Fixed bad interface implementation in Close Command Removed old code from Composite (now in Factory) Removed done @todo's Cleaned up Ping/Pong Added HyBi-10 frame/unframe test
22 lines
467 B
PHP
22 lines
467 B
PHP
<?php
|
|
namespace Ratchet\Command\Action;
|
|
use Ratchet\Command\CommandInterface;
|
|
use Ratchet\SocketInterface;
|
|
|
|
/**
|
|
* Close the connection to the sockets passed in the constructor
|
|
*/
|
|
class CloseConnection implements CommandInterface {
|
|
/**
|
|
* @var SocketInterface
|
|
*/
|
|
protected $_socket;
|
|
|
|
public function __construct(SocketInterface $socket) {
|
|
$this->_socket = $socket;
|
|
}
|
|
|
|
function execute() {
|
|
$this->_socket->close();
|
|
}
|
|
} |