kaos.vlik
Class SimpleSocket
java.lang.Object
kaos.vlik.SimpleSocket
- All Implemented Interfaces:
- Transport
public class SimpleSocket
- extends java.lang.Object
- implements Transport
The simplest of sockets. Either serves on a port or tries to connect
to CONNECTION_IP_ADDRESS.
Constructor Summary |
SimpleSocket(int port,
boolean isServer)
|
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
SimpleSocket
public SimpleSocket(int port,
boolean isServer)
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()