mxmbsocket/lib/Ratchet/Application/WebSocket/Command/Action/Disconnect.php
Chris Boden 3363c08f36 Cleanup
Removed reference to remaining ObservableInterface's and SocketInterface's
2011-11-14 16:51:16 -05:00

19 lines
485 B
PHP

<?php
namespace Ratchet\Application\WebSocket\Command\Action;
use Ratchet\Resource\Command\Action\SendMessage;
use Ratchet\Application\ApplicationInterface;
class Disconnect extends SendMessage {
protected $_code = 1000;
public function setStatusCode($code) {
$this->_code = (int)$code;
// re-do message based on code
}
public function execute(ApplicationInterface $scope = null) {
parent::execute();
$this->_socket->close();
}
}