kaos.robots.naimtsimulator
Class SimpleSocket

java.lang.Object
  extended by kaos.robots.naimtsimulator.SimpleSocket

public class SimpleSocket
extends java.lang.Object

The simplest of sockets. Either serves on a port or tries to connect to CONNECTION_IP_ADDRESS.


Field Summary
static java.lang.String CONNECTION_IP_ADDRESS
           
 
Constructor Summary
SimpleSocket(int port, boolean isServer)
           
 
Method Summary
 void close()
           
 java.lang.String get()
           
 java.io.BufferedReader getIn()
           
 java.io.PrintWriter getOut()
           
static SimpleSocket listenOn(int port)
           
 void put(java.lang.String s)
           
static SimpleSocket serveOn(int port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTION_IP_ADDRESS

public static java.lang.String CONNECTION_IP_ADDRESS
Constructor Detail

SimpleSocket

public SimpleSocket(int port,
                    boolean isServer)
Method Detail

serveOn

public static SimpleSocket serveOn(int port)

listenOn

public static SimpleSocket listenOn(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()