<?php

namespace Spiral\Goridge;

use Spiral\Goridge\Exception\RelayException;

/**
 * Blocking, duplex relay.
 */
interface RelayInterface
{
    /**
     * @return Frame
     * @throws RelayException
     */
    public function waitFrame();

    /**
     * @param Frame $frame
     * @return void
     */
    public function send($frame);
}
