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:
0.7.5 12 April 2001
Author:
Jason Kitcat

Field Summary
protected static java.lang.String ER_address
          constant to hold address of electoral roll server gibson.swingdigital.com
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 int freeRTPort
           
protected static java.lang.String R_address
          constant to hold address of regional server
protected  TimeOutThread timer
           
 
Constructor Summary
protected Comms()
           
 
Method Summary
protected  java.util.Date getCheck()
           
protected  java.lang.String getERAuthKey()
           
protected  java.lang.String getMessage()
           
protected  char getType()
           
protected  void noCheck()
           
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.
protected  void sendDiag(java.lang.String msg)
          sendDiag dispatches any diagnostic packets for debugging.
protected  void sendVote(java.lang.String party)
          sendVote creates check date for security and sends a vote packet.
protected  void setERAuthKey(java.lang.String x)
           
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

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 gibson.swingdigital.com

freePort

protected static final int freePort
constant to store value being used as FREE port number For security reasons I recommend this is changed regularly

freeRTPort

protected static final int freeRTPort
Constructor Detail

Comms

protected Comms()
Method Detail

setFromServer

protected void setFromServer(java.lang.String x)

getCheck

protected java.util.Date getCheck()

getERAuthKey

protected java.lang.String getERAuthKey()

setERAuthKey

protected void setERAuthKey(java.lang.String x)

noCheck

protected void noCheck()

getMessage

protected java.lang.String getMessage()

getType

protected char getType()

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 user
code - A unique code for this election only
password - Self explanatory

sendDiag

protected void sendDiag(java.lang.String msg)
sendDiag dispatches any diagnostic packets for debugging.
Parameters:
msg - Data for packet