mxmbsocket/lib/Ratchet/Application/WebSocket/Command/Action/Disconnect.php
Chris Boden 47b7110dc1 Namespaces
Fixed all the namespaces to match new folder structure
2011-11-12 20:51:54 -05:00

20 lines
496 B
PHP

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