Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * Jingga |
| 4 | * |
| 5 | * PHP Version 8.1 |
| 6 | * |
| 7 | * @package phpOMS\Socket |
| 8 | * @copyright Dennis Eichhorn |
| 9 | * @license OMS License 2.0 |
| 10 | * @version 1.0.0 |
| 11 | * @link https://jingga.app |
| 12 | */ |
| 13 | declare(strict_types=1); |
| 14 | |
| 15 | namespace phpOMS\Socket; |
| 16 | |
| 17 | /** |
| 18 | * Socket class. |
| 19 | * |
| 20 | * @package phpOMS\Socket |
| 21 | * @license OMS License 2.0 |
| 22 | * @link https://jingga.app |
| 23 | * @since 1.0.0 |
| 24 | */ |
| 25 | interface SocketInterface |
| 26 | { |
| 27 | /** |
| 28 | * Create the socket. |
| 29 | * |
| 30 | * @param string $ip IP address |
| 31 | * @param int $port Port |
| 32 | * |
| 33 | * @return void |
| 34 | * |
| 35 | * @since 1.0.0 |
| 36 | */ |
| 37 | public function create(string $ip, int $port) : void; |
| 38 | |
| 39 | /** |
| 40 | * Close socket. |
| 41 | * |
| 42 | * @return void |
| 43 | * |
| 44 | * @since 1.0.0 |
| 45 | */ |
| 46 | public function close() : void; |
| 47 | |
| 48 | /** |
| 49 | * Run socket. |
| 50 | * |
| 51 | * @return void |
| 52 | * |
| 53 | * @since 1.0.0 |
| 54 | */ |
| 55 | public function run() : void; |
| 56 | } |