php-ipc/src/Interop/Channel/ChannelInterface.php

29 lines
484 B
PHP

<?php
namespace NoccyLabs\Ipc\Interop\Channel;
interface ChannelInterface
{
/**
* Check if the channel is open
*
* @return boolean
*/
public function isOpen():bool;
/**
* Receive (and unserialize) a frame of data.
*
* @return mixed
*/
public function receive();
/**
* Send a frame of data, returns true on success
*
* @param mixed $data
* @return bool
*/
public function send($data):bool;
}