More inline docs

This commit is contained in:
2024-02-22 00:34:11 +01:00
parent 417c11670a
commit be6955ea48
2 changed files with 47 additions and 4 deletions

View File

@ -25,8 +25,10 @@ class WebSocketConnection implements WebSocketInterface
const OP_PING = 0x9;
const OP_PONG = 0xA;
/** @var string|null The name of the group that this connection has joined, or null */
private ?string $groupName = null;
/** @var WebSocketCodec The frame encoder/decoder */
private WebSocketCodec $codec;
private ?ConnectionGroup $group = null;
@ -171,32 +173,50 @@ class WebSocketConnection implements WebSocketInterface
return $this->request->getServerParams()['SERVER_ADDR'];
}
/**
* {@inheritDoc}
*/
public function isReadable()
{
return $this->inStream->isReadable();
}
/**
* {@inheritDoc}
*/
public function pause()
{
$this->inStream->pause();
}
/**
* {@inheritDoc}
*/
public function resume()
{
$this->inStream->resume();
}
/**
* {@inheritDoc}
*/
public function isWritable()
{
return $this->outStream->isWritable();
}
/**
* {@inheritDoc}
*/
public function pipe(WritableStreamInterface $dest, array $options = array())
{
// TODO implement
return $dest;
}
/**
* {@inheritDoc}
*/
public function write($data)
{
return $this->send(self::OP_FRAME_TEXT, $data);
@ -225,12 +245,18 @@ class WebSocketConnection implements WebSocketInterface
return true;
}
/**
* {@inheritDoc}
*/
public function close()
{
$this->outStream->close();
$this->inStream->close();
}
/**
* {@inheritDoc}
*/
public function end($data = null)
{