| 1 | <?php |
||
| 19 | class UdpClientSocket implements SocketInterface, WithoutConnectionInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Original server socket |
||
| 23 | * |
||
| 24 | * @var SocketInterface |
||
| 25 | */ |
||
| 26 | private $origin; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * I/O interface |
||
| 30 | * |
||
| 31 | * @var IoInterface |
||
| 32 | */ |
||
| 33 | private $ioInterface; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * UdpClientSocket constructor. |
||
| 37 | * |
||
| 38 | * @param SocketInterface $origin Original server socket |
||
| 39 | * @param string $remoteAddress Client address |
||
| 40 | * @param string $data Data for this client |
||
| 41 | */ |
||
| 42 | 8 | public function __construct(SocketInterface $origin, $remoteAddress, $data) |
|
| 47 | |||
| 48 | /** {@inheritdoc} */ |
||
| 49 | 3 | public function open($address, $context = null) |
|
| 53 | |||
| 54 | /** {@inheritdoc} */ |
||
| 55 | 1 | public function close() |
|
| 59 | |||
| 60 | /** {@inheritdoc} */ |
||
| 61 | 1 | public function read(FramePickerInterface $picker) |
|
| 65 | |||
| 66 | /** {@inheritdoc} */ |
||
| 67 | 1 | public function write($data) |
|
| 71 | |||
| 72 | /** {@inheritdoc} */ |
||
| 73 | 4 | public function getStreamResource() |
|
| 77 | |||
| 78 | /** |
||
| 79 | * @inheritDoc |
||
| 80 | */ |
||
| 81 | 1 | public function __toString() |
|
| 85 | } |
||
| 86 |