+ protected function setupProxyTunnel (string $host, int $port, $socketResource) {
+ // Validate parameter
+ if (empty($host)) {
+ // Throw IAE
+ throw new InvalidArgumentException('Parameter "host" is empty');
+ } elseif ($port < 1) {
+ // Throw IAE
+ throw new InvalidArgumentException(sprintf('port=%d is not valid', $port));
+ } elseif (!is_resource($socketResource)) {
+ // Throw IAE
+ throw new InvalidArgumentException(sprintf('socketResource[]=%s is not valid', gettype($socketResource)));
+ }
+