mxmbsocket/lib/Ratchet/Command/Action/CloseConnection.php
2011-11-06 18:24:50 -05:00

22 lines
469 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 $sockets) {
$this->_socket = $sockets;
}
function execute() {
$this->_socket->close();
}
}