|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Free.Comms
Comms is the key class for launching communications with servers.
The class launches a thread for TCP/IP communications and also contains
the methods for building packets. These packets are then held in
message
for retrieval by TCPClient
Field Summary | |
protected static java.lang.String |
ER_address
constant to hold address of electoral roll server |
protected static int |
freePort
constant to store value being used as FREE port number for security reasons I recommend this is changed regularly |
protected static java.lang.String |
T_address
constant to hold address of totaller server |
protected int |
tdCount
keeps track of where we are in the Vector |
protected TimeOutThread |
timer
|
protected java.util.Vector |
totalData
stores total packet data while waiting to be sent |
Constructor Summary | |
protected |
Comms()
|
Method Summary | |
protected java.util.Date |
getCheck()
|
protected java.lang.String |
getMessage()
|
protected void |
getTotalVoted()
getTotalVoted communicates with the ERServer to find out how many people voted. |
protected char |
getType()
|
protected void |
noCheck()
|
protected void |
sendDiag(java.lang.String msg)
sendDiag dispatches any diagnostic packets for debugging. |
protected void |
sendKey(java.lang.String akey)
sendKey delivers a key to an ERServer for confirming someone has voted. |
protected void |
sendTotals()
sendTotals creates check date for security, calculates vote counts and sends on to the Totaller server. |
protected void |
setFromServer(java.lang.String x)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected TimeOutThread timer
protected static final java.lang.String T_address
protected static final java.lang.String ER_address
protected static final int freePort
protected java.util.Vector totalData
protected int tdCount
Constructor Detail |
protected Comms()
Method Detail |
protected void setFromServer(java.lang.String x)
protected java.util.Date getCheck()
protected void noCheck()
protected java.lang.String getMessage()
protected char getType()
protected void sendTotals()
protected void sendKey(java.lang.String akey) throws java.lang.Exception
akey
- The key to sendprotected void getTotalVoted()
protected void sendDiag(java.lang.String msg)
msg
- Data for packet
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |