|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.deas.hyperenc.vsat.server.VSatNameServer
public class VSatNameServer
This is a central nameserver of the PSN network. It accepts incoming requests consisting of a single 32-bit integer, the PSN selection key. This key is used to choose a PSN from a list of PSNs and associated keys; the PSN whose key is numerically closest to the request key is chosen. The server replies to the incoming request by sending the IP address of the chosen PSN as a sequence of 4 bytes (high octet first).
The server is a standalone application. When launched, it reads in a configuration file.
The configuration file must be a Java Properties XML file. The only required
key is db_file
, which specifies the file containing the PSN
list. Optional keys include:
port
- the port on which to listen for incoming connectionsbacklog
- the number of connections to backlog before
refusing additional connectionsnum_workers
- the number of simultaneous threads to spawn to
service incoming requestsThe PSN list must be a text file. Each line contains an integer key, followed by a comma, followed by a hostname or IP address giving the location of a PSN. Incoming requests result in a PSN being chosen from this list as described above.
Field Summary | |
---|---|
static int |
DEFAULT_PORT
Default server port to listen to. |
Method Summary | |
---|---|
static void |
main(String[] args)
Launches the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PORT
Method Detail |
---|
public static void main(String[] args)
args
- Requires a single command line argument: the location of the
configuration file.Properties
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |