This is automatic generated document for things in Swow\WebSocket\Header class
A WebSocket frame header.
The object is a Buffer that holds the header bytes.
Methods
Method __construct
public function __construct ( bool $fin , bool $rsv1 , bool $rsv2 , bool $rsv3 , int $opcode , int $payloadLength , string $maskingKey ) Method __debugInfo
public function __debugInfo ( ) : array<string, mixed> Returns array<string, mixed> debug information for var_dump
Method getFin
public function getFin ( ) : bool public function getHeaderSize ( ) : int Method getMask
public function getMask ( ) : bool Method getMaskingKey
public function getMaskingKey ( ) : string Method getOpcode
public function getOpcode ( ) : int Method getPayloadLength
public function getPayloadLength ( ) : int Method getRSV1
public function getRSV1 ( ) : bool Method getRSV2
public function getRSV2 ( ) : bool Method getRSV3
public function getRSV3 ( ) : bool Method setFin
public function setFin ( bool $fin ) : static Method setMaskingKey
public function setMaskingKey ( string $maskingKey ) : static Set the masking key.
An empty key clears the mask bit. A 4 byte key sets the mask bit.
Method setOpcode
public function setOpcode ( int $opcode ) : static Set the opcode.
The opcode uses 4 bits. Larger values are truncated.
Method setPayloadInfo
public function setPayloadInfo ( int $payloadLength , string $maskingKey ) : static Method setPayloadLength
public function setPayloadLength ( int $payloadLength ) : static Set the payload length.
The method does not check the value.
Method setRSV1
public function setRSV1 ( bool $rsv1 ) : static Method setRSV2
public function setRSV2 ( bool $rsv2 ) : static Method setRSV3
public function setRSV3 ( bool $rsv3 ) : static