Interface TransportServer

All Superinterfaces:
AutoCloseable

public interface TransportServer extends AutoCloseable
A server that communicates with a client over a transport protocol.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Receive a move selection from the client.
    void
    Initialize the transport server.
    void
    send(GameState state)
    Send the given game state to the client.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • initialize

      void initialize(TransportConfiguration config)
      Initialize the transport server.
      Parameters:
      config - the configuration for the transport server
    • send

      void send(GameState state)
      Send the given game state to the client.
      Parameters:
      state - the game state to send
    • accept

      int accept()
      Receive a move selection from the client.
      Returns:
      the move selection