Package rocks.imsofa.sjl
Class SimpleServer
java.lang.Object
rocks.imsofa.sjl.SimpleServer
a simple server that only handles string input and output
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleServer(int port, SimpleServerCallback callback) start the server on the given portSimpleServer(SimpleServerCallback callback) start the server on a randomly assigned port -
Method Summary
-
Constructor Details
-
SimpleServer
start the server on a randomly assigned port- Parameters:
callback-- Throws:
InterruptedException
-
SimpleServer
start the server on the given port- Parameters:
port-callback-- Throws:
InterruptedException
-
-
Method Details
-
getPort
public int getPort()- Returns:
- the real port used to run the server
-
shutdown
shutdown the server gracefully- Throws:
InterruptedException
-