|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCards304Client
public class Cards304Client
This Cards304Client class represents the client actoins of this network based 304 card game. This class is mostly used to send and recieve messages to the and from the server class.
Nested Class Summary | |
---|---|
(package private) class |
Cards304Client.IncomingReader
This IncomingReader class is to run a thread and listen to the server messages. |
Field Summary | |
---|---|
private boolean |
connectionEstablished
|
private Player |
player
|
(package private) java.io.BufferedReader |
reader
|
(package private) java.lang.Thread |
readerThread
|
(package private) java.net.Socket |
sock
|
(package private) java.io.PrintWriter |
writer
|
Constructor Summary | |
---|---|
Cards304Client()
Constructer class of Cards304Client class. |
Method Summary | |
---|---|
private void |
cleanUp()
This method is to terminate the connection with server. |
protected void |
finalize()
This method will be called when this game exists. |
void |
go()
This method is to setup the network connection with Cards304Server. |
static void |
main(java.lang.String[] args)
|
void |
send(java.lang.String msg)
This method sends message to server. |
private boolean |
setUpNetworking()
This method is to create a socket and create a network connection with the server. |
void |
takeAction(java.lang.String clientMsg)
This method is to take action for server messages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Player player
private boolean connectionEstablished
java.io.BufferedReader reader
java.io.PrintWriter writer
java.net.Socket sock
java.lang.Thread readerThread
Constructor Detail |
---|
public Cards304Client()
Method Detail |
---|
public void go()
public void send(java.lang.String msg)
private boolean setUpNetworking()
private void cleanUp()
protected void finalize()
finalize
in class java.lang.Object
public void takeAction(java.lang.String clientMsg)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |