src/FreeDSx/Socket/Socket.php
public static function create(string $host, array $options = []) : Socket
    {
        return (new self(null, $options))->connect($host);
    }
public static function create(string $host, array $options = []) : Socket
    {
        return (new self(null, $options))->connect($host);
    }
public static function create ( string $ host , array $ options = [ ] ) : Socket { return ( new self ( null , $ options ) ) -> connect ( $ host ) ; }
Create a socket by connecting to a specific host.

@param string $host
@param array $options
@return Socket
@throws ConnectionException
Create a socket by connecting to a specific host .