kaos.robots.naimtsimulator
Class ReconnectSocket
java.lang.Object
kaos.robots.naimtsimulator.ReconnectSocket
public class ReconnectSocket
- extends java.lang.Object
A server socket that allows for reconnection. Consider the following
scenario.
You have a simulator and a visualizer. The simulator uses a ReconnectSocket
socket to send updates to the visualizer. You're working on the visualizer,
so you'd like to be able to run a test, stop the the visualizer, and then
restart it without having to do anything special on the simulator side.
If that's what you want, then this is the socket for you!
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONNECTION_IP_ADDRESS
public static java.lang.String CONNECTION_IP_ADDRESS
ReconnectSocket
public ReconnectSocket(int port)
serveOn
public static ReconnectSocket serveOn(int port)
close
public void close()
put
public void put(java.lang.String s)
get
public java.lang.String get()
getIn
public java.io.BufferedReader getIn()
getOut
public java.io.PrintWriter getOut()
handleLostConnection
protected void handleLostConnection()