| 1 |
<?php |
| 2 |
|
| 3 |
namespace React\Datagram; |
| 4 |
|
| 5 |
use Evenement\EventEmitterInterface; |
| 6 |
|
| 7 |
/** |
| 8 |
* interface very similar to React\Stream\Stream |
| 9 |
* |
| 10 |
* @event message($data, $remoteAddress, $thisSocket) |
| 11 |
* @event error($exception, $thisSocket) |
| 12 |
* @event close($thisSocket) |
| 13 |
*/ |
| 14 |
interface SocketInterface extends EventEmitterInterface |
| 15 |
{ |
| 16 |
public function send($data, $remoteAddress = null); |
| 17 |
|
| 18 |
public function close(); |
| 19 |
|
| 20 |
public function end(); |
| 21 |
|
| 22 |
public function resume(); |
| 23 |
|
| 24 |
public function pause(); |
| 25 |
|
| 26 |
public function getLocalAddress(); |
| 27 |
|
| 28 |
public function getRemoteAddress(); |
| 29 |
} |