How to close websocket with specific close code?
I'm probably missing something obvious here, but have been trying to figure this out for hours with no joy, so would be very grateful for a pointer...

In my application I need to close a websocket with a specific code (e.g. 1011) if an error occurs.  However, I can't see how to get access to the "close" function which accepts a code parameter.

Here's the bare bones of what I'm doing:

```
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;

$loop = React\EventLoop\Factory::create();
$MyServer= new MyServer($loop);

$webSock = new React\Socket\Server('0.0.0.0:8010', $loop);
$server = new IoServer(
	new HttpServer(
		new WsServer(
			$MyServer
		)
	),
	$webSock
);
$loop->run();
```

And:

```
use Ratchet\MessageComponentInterface;
use Ratchet\ConnectionInterface;

class MyServer implements MessageComponentInterface {
	...
	public function onError(ConnectionInterface $conn, \Exception $e) {
		// ($conn instanceof WsConnection) is FALSE
		$conn->close(1011); // Closes with code 1000
	}
}
```