public function createSocket(): Socket
    {
        return new Socket(
                $this->hostname(),
                $this->port(),
                (($this->isHttps()) ? ('ssl://') : (null))
        );
    }
public function createSocket(): Socket
    {
        return new Socket(
                $this->hostname(),
                $this->port(),
                (($this->isHttps()) ? ('ssl://') : (null))
        );
    }
public function createSocket ( ) : Socket { return new Socket ( $ this -> hostname ( ) , $ this -> port ( ) , ( ( $ this -> isHttps ( ) ) ? ( 'ssl://' ) : ( null ) ) ) ; }
creates a socket to this uri

@return  \stubbles\peer\Socket
@since   6.0.0
creates a socket to this uri