<?php

declare(strict_types=1);

namespace PhpWA\Client;

use PhpWA\Auth\AuthenticationCredentials;
use PhpWA\Protocol\Binary\BinaryNode;
use PhpWA\Runtime\Deadline;

interface ProtocolConnectionInterface
{
    public function open(AuthenticationCredentials $credentials, Deadline $deadline): void;
    public function send(BinaryNode $node, Deadline $deadline): void;
    public function receive(Deadline $deadline): BinaryNode;
    public function close(): void;
    public function isOpen(): bool;
    public function state(): string;
}
