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

29 lines
454 B
PHP
Raw Normal View History

2018-04-15 14:41:46 +00:00
<?php
namespace NoccyLabs\Ipc\Interop\Channel;
interface ChannelInterface
{
2018-04-15 20:08:19 +00:00
/**
* Check if the channel is open
*
* @return boolean
*/
2018-04-15 14:41:46 +00:00
public function isOpen():bool;
2018-04-15 20:08:19 +00:00
/**
* Receive (and unserialize) a frame of data.
*
* @return mixed
*/
2018-04-15 14:41:46 +00:00
public function receive();
2018-04-15 20:08:19 +00:00
/**
* Send a frame of data
*
* @param mixed $data
* @return void
*/
2018-04-15 14:41:46 +00:00
public function send($data);
}