FreeClient
Class Comms
java.lang.Object
|
+--FreeClient.Comms
- public class Comms
- extends java.lang.Object
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
- Version:
- 1.1 8 September 2001
- Author:
- Jason Kitcat
Field Summary |
protected static java.lang.String |
ER_address
constant to hold address of electoral roll server |
protected static java.lang.String |
er_public_key
|
protected static java.lang.String |
fc_private_key
|
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
|
protected static java.lang.String |
R_address
constant to hold address of regional server |
protected static java.lang.String |
rt_public_key
public and private keys for communications |
protected TimeOutThread |
timer
|
Constructor Summary |
protected |
Comms()
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timer
protected TimeOutThread timer
R_address
protected static final java.lang.String R_address
- constant to hold address of regional server
ER_address
protected static final java.lang.String ER_address
- constant to hold address of electoral roll server
freePort
protected static final int freePort
- constant to store value being used as GNU.FREE port number
For security reasons I recommend this is changed regularly
freeRTPort
protected static final int freeRTPort
rt_public_key
protected static final java.lang.String rt_public_key
- public and private keys for communications
er_public_key
protected static final java.lang.String er_public_key
fc_private_key
protected static final java.lang.String fc_private_key
Comms
protected Comms()
setFromServer
protected void setFromServer(java.lang.String x)
getCheck
protected java.util.Date getCheck()
getsession_key
protected java.lang.String getsession_key()
setsession_key
protected void setsession_key(java.lang.String x)
getERAuthKey
protected java.lang.String getERAuthKey()
setERAuthKey
protected void setERAuthKey(java.lang.String x)
noCheck
protected void noCheck()
getMessage
protected java.lang.String getMessage()
getMessage_two
protected java.lang.String getMessage_two()
getType
protected char getType()
getServer_hmac_key
protected java.lang.String getServer_hmac_key()
setServer_hmac_key
protected void setServer_hmac_key(java.lang.String x)
getClient_hmac_key
protected java.lang.String getClient_hmac_key()
setClient_hmac_key
protected void setClient_hmac_key(java.lang.String x)
getClient_hmac_seed
protected java.lang.String getClient_hmac_seed()
getServer_hmac_seed
protected java.lang.String getServer_hmac_seed()
setServer_hmac_seed
protected void setServer_hmac_seed(java.lang.String x)
getSequence_number
protected int getSequence_number()
setSequence_number
protected void setSequence_number(int x)
sendVote
protected void sendVote(java.lang.String party)
- sendVote creates check date for security and sends a vote packet.
- Parameters:
party
- String to hold voter's choice
sendAuth
protected void sendAuth(java.lang.String name,
java.lang.String code,
java.lang.String password)
- sendAuth dispatches a packet to the ERServer for voter authentication.
Since 1.5 the PIN and password have been sent as digests.
- Parameters:
name
- Name of usercode
- A unique code for this election onlypassword
- Self explanatory
sendDiag
protected void sendDiag(java.lang.String msg)
- sendDiag dispatches any diagnostic packets for debugging.
- Parameters:
msg
- Data for packet