twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks
Welcome

ConnectionAdapter

An abstraction of a WebHook connection adapter.

Overview

Properties

listenUsingSsl

Type: boolean

Whether the connection adapter listens using SSL.

pathPrefix

Type: ?string

The path prefix an external connection needs to reach this server.

Please note that the layer redirecting to this server needs to strip the path prefix in order for this to work.

For example, if this is set to /hooks, an external connection to /hooks/abc should pass /abc as the path to this server.

Methods

createHttpServer()

Creates the HTTP server to use for listening to events.

Return type: Server

getExternalPort()

async

Returns the port that should be used by Twitch to connect to this server.

If not given, this is equal to the listener port.

Return type: ?number

getHostName()

async

Returns the host name that should be used by Twitch to connect to this server.

Return type: string

getListenerPort()

async

The port the HTTP server should listen on.

If not given, this should be a parameter to EventSub#listen instead.

Return type: ?number