Package dev.qixils.crowdcontrol.socket
Class ServerSocketManager
- java.lang.Object
-
- dev.qixils.crowdcontrol.socket.ServerSocketManager
-
- All Implemented Interfaces:
SocketManager
public final class ServerSocketManager extends Object implements SocketManager
Manages the connection to Crowd Control clients.
-
-
Constructor Summary
Constructors Constructor Description ServerSocketManager(@NotNull CrowdControl crowdControl)
Creates a new server-side socket manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
shutdown(@Nullable Request cause, @Nullable String reason)
Shuts down the Crowd Control socket and sends an explanation message to the streamer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.qixils.crowdcontrol.socket.SocketManager
shutdown, shutdown
-
-
-
-
Constructor Detail
-
ServerSocketManager
@CheckReturnValue public ServerSocketManager(@NotNull @NotNull CrowdControl crowdControl)
Creates a new server-side socket manager. This is intended only for use by the library.- Parameters:
crowdControl
- Crowd Control instance
-
-
Method Detail
-
shutdown
public void shutdown(@Nullable @Nullable Request cause, @Nullable @Nullable String reason) throws IOException
Description copied from interface:SocketManager
Shuts down the Crowd Control socket and sends an explanation message to the streamer.- Specified by:
shutdown
in interfaceSocketManager
- Parameters:
cause
- cause for shutting downreason
- the reason for shutting down- Throws:
IOException
- an I/O exception occurred while trying to close the socket
-
-