|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectluky.serverSimple.Client
public class Client
The Client class is a template class for the luky server client thread. use this class to setup, communicat and close server communications. The Client uses the Log class for it's loggings
the class is threadsafe since rev. 2
Field Summary | |
---|---|
protected boolean |
connected
|
protected BufferedReader |
reader
variables |
protected PrintWriter |
writer
|
Constructor Summary | |
---|---|
Client(String ip,
int portNr)
constructor, takes ip number and portnumber of the server to connect to |
|
Client(String ip,
String port)
|
Method Summary | |
---|---|
String |
getLine(String command)
sends a command and expects one line terminated with OK. on return |
Vector |
getList(String command)
sends a command and expects a list of lines terminated with OK. on return |
int |
openConnection()
|
int |
sendCommand(String command)
sends a command and expects OK. on return |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BufferedReader reader
protected PrintWriter writer
protected boolean connected
Constructor Detail |
---|
public Client(String ip, int portNr)
public Client(String ip, String port)
Method Detail |
---|
public int openConnection()
public int sendCommand(String command)
public String getLine(String command)
public Vector getList(String command)
|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |