Interface TestDedicatedServerContext

All Superinterfaces:
AutoCloseable, TestServerContext

@NonExtendable public interface TestDedicatedServerContext extends TestServerContext, AutoCloseable
Context for a client gametest containing various helpful functions while an in-process dedicated server is running. This class implements AutoCloseable and is intended to be used in a try-with-resources statement. When closed, the dedicated server will be stopped.

Functions in this class can only be called on the client gametest thread.

  • Method Details

    • connect

      Connects the client to the dedicated server. The resulting connection is intended to be used in a try-with-resources statement.
      Returns:
      The connection handle to the dedicated server
    • close

      void close()
      Stops the dedicated server.
      Specified by:
      close in interface AutoCloseable