Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/BlockingRelayInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace Spiral\Goridge;

/**
* Means that relay can't be used for non-blocking flow.
*/
interface BlockingRelayInterface extends RelayInterface
{
}
6 changes: 4 additions & 2 deletions src/Frame.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ final class Frame
* @var positive-int Flags for {@see $byte10}
*/
public const BYTE10_STREAM = 0x01;
public const BYTE10_STOP = 0x02; // 2.9.0-alpha just streams
public const BYTE10_STOP = 0x02;
public const BYTE10_PING = 0x04;
public const BYTE10_PONG = 0x08;

/**
* @psalm-var FrameByte10Value
Expand Down Expand Up @@ -124,7 +126,7 @@ public static function packFrame(Frame $frame): string
* @return HeaderList
* @internal
*
* @psalm-suppress InvalidReturnStatement, InvalidReturnType
* @psalm-suppress LessSpecificReturnStatement, MoreSpecificReturnType
*/
public static function readHeader(string $header): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/StreamRelay.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* prefix:
* [ flag ][ message length, unsigned int 64bits, LittleEndian ]
*/
class StreamRelay extends Relay
class StreamRelay extends Relay implements BlockingRelayInterface
{
/**
* @var resource
Expand Down