Skip to content
This repository was archived by the owner on Sep 19, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,34 @@ JAVA 7 when working with this project.
the following two commands in separate shells:

```
$ sh run_server.sh
$ sh run_client.sh
$ sh run_server.sh <team_id> <team_secret> <port>
$ sh run_client.sh <host> <port>
```

The `run_server` and `run_client` scripts have hard-coded addresses for
your local machine. If you are running the server on a different machine
than the client, you will need to change the host portion of the address
in `run_client.sh` to the name of the host where your server is running.
Make sure the client and server are using the same port number.
You must specify the following startup arguments for `run_server.sh:
+ `<team_id>` and `<team_secret>`: a numeric id for your team, and a secret
code, which are used to authenticate your server with the Relay server.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secrete must be HEX (ie. a string of a-fA-F0-9)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server takes any string as input, and unless one connects to the Relay the secret is never used. Plus Secret.parse() can handle non-hex characters, so any char out of range will be seen as 0, but I'll add the specs anyway :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Secret.parse really should be changed to throw an IOException.

You can specify any integer value for `<team_id>`, and a value expressed
in hexadecimal format (using numbers `0-9` and letters in the range
`A-F`) for `<team_secret>` when you launch the server in your local setup
since it will not connect to the Relay server.
+ `<port>`: the TCP port that your Server will listen on for connections
from the Client. You can use any value between 1024 and 65535, as long as
there is no other service currently listening on that port in your
system. The server will return an error:

```
java.net.BindException: Address already in use (Bind failed)
```

if the port is already in use.

The startup arguments for `run_client.sh` are the following:
+ `<host>`: the hostname or IP address of the computer on which the server
is listening. If you are running server and client on the same computer,
you can use `localhost` here.
+ `<port>`: the port on which your server is listening. Must be the same
port number you have specified when you launched `run_server.sh`.

All running images write informational and exceptional events to log files.
The default setting for log messages is "INFO". You may change this to get
Expand All @@ -66,12 +85,13 @@ All the source files (except test-related source files) are in
use the supplied scripts to build the project, the `.class` files will be placed
in `./bin`. There is a `./third_party` directory that holds the jar files for
JUnit (a Java testing framework). Your environment may or may not already have
this installed. The supplied scripts use the version in ./third_party.
this installed. The supplied scripts use the version in `./third_party`.

Finally, there are some high-level design documents in the project Wiki. Please
review them as they can help you find your way around the sources.



## Source Directories

The major project components have been separated into their own packages. The
Expand Down