mxmbsocket/lib/Ratchet/Command/Action/CloseConnection.php
Chris Boden 60a8a04e40 Cleanup
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
2011-11-07 11:55:07 -05:00

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();
}
}