'Returns the streaming server, port, ssl_enabled flag, and headers.'

def get_streaming_specs(self):

    streaming_url = get_config()['plotly_streaming_domain']
    ssl_verification_enabled = get_config()['plotly_ssl_verification']
    ssl_enabled = ('https' in streaming_url)
    port = (self.HTTPS_PORT if ssl_enabled else self.HTTP_PORT)
    host = (six.moves.urllib.parse.urlparse(streaming_url).hostname or streaming_url)
    headers = {'Host': host, 'plotly-streamtoken': self.stream_id}
    streaming_specs = {'server': host, 'port': port, 'ssl_enabled': ssl_enabled, 'ssl_verification_enabled': ssl_verification_enabled, 'headers': headers}
    return streaming_specs
