mil.navy.nps.bridge
Class MulticastRelayServer

java.lang.Object
  extended bymil.navy.nps.bridge.MulticastRelayServer

class MulticastRelayServer
extends java.lang.Object

Relays datagrams from/to MulticastRelayClient.


Field Summary
protected  java.net.InetAddress address
           
protected  java.net.InetAddress check_address
           
protected  int check_port
           
protected  java.util.Vector client_address_vec
           
protected  java.util.Vector client_port_vec
           
protected  java.util.Vector client_reply_vec
           
protected  java.net.DatagramPacket connectDatagramPacket
           
protected  int count
           
protected static int defaultPort
           
protected static int delayTime
           
protected  java.net.DatagramPacket hellopacket
           
protected  java.net.MulticastSocket multicastsocket
           
protected  java.net.DatagramPacket outDgram
           
protected  java.net.DatagramPacket packet
           
protected  int port
           
protected  java.net.DatagramPacket responsepacket
           
protected  java.net.DatagramSocket socket
           
protected  java.net.InetAddress thisAddress
           
protected  int unicastPort
           
 
Constructor Summary
(package private) MulticastRelayServer()
           
 
Method Summary
 void checkClientReplyList()
           
 void clientListen()
           
static void main(java.lang.String[] args)
          Creates instance of server and client listen thread
 void mcastCheckClients()
          send a hello message to each client and wait for a response, if no response is heard after three attempts, remove client from the client address vector
 void mcastListen()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client_address_vec

protected java.util.Vector client_address_vec

client_port_vec

protected java.util.Vector client_port_vec

defaultPort

protected static int defaultPort

unicastPort

protected int unicastPort

socket

protected java.net.DatagramSocket socket

connectDatagramPacket

protected java.net.DatagramPacket connectDatagramPacket

packet

protected java.net.DatagramPacket packet

address

protected java.net.InetAddress address

port

protected int port

count

protected int count

multicastsocket

protected java.net.MulticastSocket multicastsocket

outDgram

protected java.net.DatagramPacket outDgram

delayTime

protected static int delayTime

responsepacket

protected java.net.DatagramPacket responsepacket

hellopacket

protected java.net.DatagramPacket hellopacket

check_address

protected java.net.InetAddress check_address

thisAddress

protected java.net.InetAddress thisAddress

check_port

protected int check_port

client_reply_vec

protected java.util.Vector client_reply_vec
Constructor Detail

MulticastRelayServer

MulticastRelayServer()
Method Detail

main

public static void main(java.lang.String[] args)
Creates instance of server and client listen thread


mcastListen

public void mcastListen()

clientListen

public void clientListen()

mcastCheckClients

public void mcastCheckClients()
send a hello message to each client and wait for a response, if no response is heard after three attempts, remove client from the client address vector


checkClientReplyList

public void checkClientReplyList()