|
||||||||||
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 java.util.Vector |
client_hmac_keys
|
protected java.util.Vector |
client_hmac_seeds
|
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 GNU.FREE port number for security reasons I recommend this is changed regularly |
protected static int |
freeRTPort
port number for RTServer |
protected java.util.Vector |
message_twos
|
protected java.util.Vector |
server_hmac_keys
|
protected java.util.Vector |
server_hmac_seeds
|
protected java.util.Vector |
session_count
|
protected java.util.Vector |
session_data
|
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 java.util.Vector |
threadTimeOut
Vector to store TimeOut threads |
protected java.util.Vector |
threadVect
Vector to store TCPClient threads |
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 |
getCheckKey()
|
protected java.lang.String |
getMessage()
|
protected java.lang.String[] |
getSession(int vectIndex)
tries to find matching session data. |
protected void |
getTotalVoted()
getTotalVoted communicates with the ERServer to find out how many people voted. |
protected char |
getType()
|
protected void |
newCheck()
|
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 |
setCheckKey(java.lang.String x)
|
protected void |
setFromServer(java.lang.String x)
|
protected void |
setSession(int vectIndex,
java.lang.String session_key,
java.lang.String client_hmac_key,
java.lang.String server_hmac_key,
java.lang.String client_hmac_seed,
java.lang.String server_hmac_seed,
int session_counter,
java.lang.String message_two)
adds entries to Vectors to keep track of session_data |
Methods inherited from class java.lang.Object |
|
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 static final int freeRTPort
protected java.util.Vector totalData
protected int tdCount
protected java.util.Vector threadVect
protected java.util.Vector threadTimeOut
protected java.util.Vector session_data
protected java.util.Vector client_hmac_keys
protected java.util.Vector server_hmac_keys
protected java.util.Vector client_hmac_seeds
protected java.util.Vector server_hmac_seeds
protected java.util.Vector session_count
protected java.util.Vector message_twos
Constructor Detail |
protected Comms()
Method Detail |
protected void setSession(int vectIndex, java.lang.String session_key, java.lang.String client_hmac_key, java.lang.String server_hmac_key, java.lang.String client_hmac_seed, java.lang.String server_hmac_seed, int session_counter, java.lang.String message_two)
vectIndex
- Index of the vector informationsession_key
- The encryption session_key to index byclient_hmac_key
- Client HMAC keyserver_hmac_key
- Server HMAC keyclient_hmac_key
- Client HMAC seedserver_hmac_key
- Server HMAC seedsession_counter
- Packet counterprotected java.lang.String[] getSession(int vectIndex)
session_key
- protected void setFromServer(java.lang.String x)
protected java.lang.String getCheckKey()
protected void setCheckKey(java.lang.String x)
protected java.util.Date getCheck()
protected void noCheck()
protected void newCheck()
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 |