Class ClientNetworkOutput
java.lang.Object
za.co.wethinkcode.robots.client.networking.ClientNetworkOutput
- All Implemented Interfaces:
AutoCloseable
The abstracted networking component of the output of a client
-
Constructor Summary
ConstructorsConstructorDescriptionClientNetworkOutput(OutputStream output) Standard constructor of a client's output -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close a client's connectionvoidsendRequest(InputParser input, Memory memory, ClientRobot launched) voidsendValidatedRequest(com.google.gson.JsonObject o)
-
Constructor Details
-
ClientNetworkOutput
Standard constructor of a client's output- Parameters:
output- the output that this abstracts over
-
-
Method Details
-
sendRequest
public void sendRequest(InputParser input, Memory memory, ClientRobot launched) throws ClientMemoryException - Throws:
ClientMemoryException
-
sendValidatedRequest
public void sendValidatedRequest(com.google.gson.JsonObject o) -
close
Close a client's connection- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- for any reason the output fails to close
-