mxmbsocket/lib/Ratchet/Application/WebSocket/Command/Action/Disconnect.php
Chris Boden 5386b4c066 Folder restructure
Just reorganized the folders.  Namespacing broken, unit tests broken, nothing works.
2011-11-12 14:29:10 -05:00

20 lines
478 B
PHP

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