network
Class ServerComms

java.lang.Object
  extended by network.AbCommsTCP
      extended by network.ServerComms
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable

public class ServerComms
extends AbCommsTCP
implements java.lang.Runnable, java.io.Serializable

Created on November 4, 2006, 4:18 PM
t.5 Made changes to communications. Switch from using datagrams to use more reliable tcp sockets.
This now starts a serverSocket and waits for a connection. Only one connection is allowed.

Version:
t.5
Author:
Eric Angeli
See Also:
Serialized Form

Constructor Summary
ServerComms()
          Creates a new instance of ServerComms
 
Method Summary
 void run()
          Handles running the thread.
 void stopComms()
          Stops comms.
 
Methods inherited from class network.AbCommsTCP
addPropertyChangeListener, getBuffer, getConnectedAddress, getPort, getPropertySupport, getRemoteHost, getRunner, getSocket, isAckRequired, isAlreadyConnected, isPauseComms, isRunning, removePropertyChangeListener, setAckRequired, setAlreadyConnected, setBuffer, setConnectedAddress, setPauseComms, setPort, setRemoteHost, setRunner, setRunning, setSocket, startComms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerComms

public ServerComms()
Creates a new instance of ServerComms

Method Detail

run

public void run()
Handles running the thread.
Contains the communication loop.
Waits to recieve a packet on the defined port, then fires event to the owner of this comms thread to handle the incoming data.
This will loop until terminated.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class AbCommsTCP

stopComms

public void stopComms()
Stops comms.

Overrides:
stopComms in class AbCommsTCP