|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectroomba.roombanetwork.util.SocketClient
public class SocketClient
This class connects to a socket server to send messages to the server
| Constructor Summary | |
|---|---|
SocketClient(java.lang.String host,
int port)
The constructor for the client. |
|
SocketClient(java.lang.String host,
int port,
boolean verbose)
The constructor for the client. |
|
| Method Summary | |
|---|---|
void |
closeSocket()
Closes the socket connection |
int |
getQueueSize()
Returns the current size of the waiting queue |
void |
limitQueueSize(int maxQueueSize)
Used to limit the maximum size of the waiting queue. |
static void |
main(java.lang.String[] args)
Test main to send a message to a server |
void |
run()
Run method that controls the functionality of the client connection |
void |
sendString(java.lang.String s)
Adds a string to the queue to send |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketClient(java.lang.String host,
int port)
host - The host that the client is connecting toport - The port that the client is connecting to
public SocketClient(java.lang.String host,
int port,
boolean verbose)
host - The host that the client is connecting toport - The port that the client is connecting toverbose - True iff the client output should be verbose| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablepublic void closeSocket()
public int getQueueSize()
public void limitQueueSize(int maxQueueSize)
maxQueueSize - The max queue size to setpublic void sendString(java.lang.String s)
s - The string to sendpublic static final void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||