Class ServerSocketManager

  • All Implemented Interfaces:
    SocketManager

    public final class ServerSocketManager
    extends Object
    implements SocketManager
    Manages the connection to Crowd Control clients.
    • 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 interface SocketManager
        Parameters:
        cause - cause for shutting down
        reason - the reason for shutting down
        Throws:
        IOException - an I/O exception occurred while trying to close the socket