| 1 | <?php |
||
| 18 | class Socket implements Streamable |
||
| 19 | { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * If you have compiled in OpenSSL support, you may prefix the hostname with either ssl:// |
||
| 23 | * or tls:// to use an SSL or TLS client connection over TCP/IP to connect to the remote host. |
||
| 24 | * |
||
| 25 | * @var string $hostname |
||
| 26 | */ |
||
| 27 | protected $host; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * The port number. |
||
| 31 | * |
||
| 32 | * @var int |
||
| 33 | */ |
||
| 34 | protected $port; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param $host |
||
| 38 | * @param $port |
||
| 39 | */ |
||
| 40 | public function __construct($host, $port) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return resource |
||
| 48 | * @throws \RuntimeException If error on making connection |
||
| 49 | */ |
||
| 50 | public function open() |
||
| 57 | } |
||
| 58 |