Class TwitchConduitSocketPool

java.lang.Object
com.github.twitch4j.eventsub.socket.conduit.TwitchConduitSocketPool
All Implemented Interfaces:
IEventSubConduit, AutoCloseable

public final class TwitchConduitSocketPool extends Object implements IEventSubConduit
Facilitates creating EventSub WebSocket shards for a new or existing Conduit.

Sample usage:

 
 IEventSubConduit conduit = TwitchConduitSocketPool.create(spec -> {
     spec.poolShards(4); // customizable pool size
     spec.clientId("your-client-id");
     spec.clientSecret("your-client-secret");
 });
 conduit.register(SubscriptionTypes.STREAM_ONLINE, b -> b.broadcasterUserId("71092938").build());
 conduit.getEventManager().onEvent(StreamOnlineEvent.class, System.out::println);
 
 
See Also: