Class Soklet

java.lang.Object
com.soklet.Soklet
All Implemented Interfaces:
AutoCloseable

@ThreadSafe public final class Soklet extends Object implements AutoCloseable
Soklet's main class - manages a Server (and optionally a ServerSentEventServer) using the provided system configuration.

 // Use out-of-the-box defaults
SokletConfig config = SokletConfig.withServer(
  Server.withPort(8080).build()
).build();

try (Soklet soklet = Soklet.withConfig(config)) {
  soklet.start();
  System.out.println("Soklet started, press [enter] to exit");
  soklet.awaitShutdown(ShutdownTrigger.ENTER_KEY);
}
Author:
Mark Allen