# Class SharedRmiSocket

java.lang.Object
it.polimi.ingsw.is25am31.network.SharedRmiSocket

public class SharedRmiSocket extends Object
The SharedRmiSocket class is responsible for starting both RMI and Socket servers. These servers work concurrently, sharing a single instance of `ControllerManager` to handle client requests.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SharedRmiSocket()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `start()`
  Starts both RMI and Socket servers concurrently.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SharedRmiSocket

    public SharedRmiSocket()

- ## Method Details

  - ### start

    public static void start()
    Starts both RMI and Socket servers concurrently. This method creates a shared `ControllerManager` instance that is used by both servers to handle client requests. Each server is started in its own thread to allow for concurrent operation: RMI Server: handles remote method invocation requests. Socket Server: handles traditional socket-based communication If either server fails to start, a `RuntimeException` will be thrown from the respective thread
    Throws:
      `RuntimeException` - if either the RMI server or Socket server fails to start properly
    See Also:
      - `ControllerManager`
      - `RmiServer.bind(ControllerManager)`
      - `SocketServer.start(ControllerManager)`