This class to manage upload and download requests via TCP.
More...
|
| | HandleTCP (Socket client, int whichPort) |
| | Constructor for TCP Handler. More...
|
| |
|
void | run () |
| | Main method to manage TCP connections, checks port number and redirects to the appropriate managing method.
|
| |
|
| void | dataDump (DataOutputStream out) throws IOException |
| | Method to dump data onto the calling client Dumps 100MB of random data. More...
|
| |
| void | blackHole (InputStream ins) |
| | Method provides a dumping ground for data to test upload speeds. More...
|
| |
|
|
Socket | client |
| |
|
final int | whichPort |
| |
|
|
static final int | BYTES_IN_MEGABYTES = 1048576 |
| |
This class to manage upload and download requests via TCP.
- Author
- Christopher Jordan , William Daniels
- Version
- 1.1
| com.server.HandleTCP.HandleTCP |
( |
Socket |
client, |
|
|
int |
whichPort |
|
) |
| |
|
inline |
Constructor for TCP Handler.
- Parameters
-
| Socket | "client" for connection |
| Int | "whichPort" for connection |
| void com.server.HandleTCP.blackHole |
( |
InputStream |
ins) | |
|
|
inlineprivate |
Method provides a dumping ground for data to test upload speeds.
- Parameters
-
| InputStream | "ins" provides input stream for data being uploaded |
| void com.server.HandleTCP.dataDump |
( |
DataOutputStream |
out) | |
throws IOException |
|
inlineprivate |
Method to dump data onto the calling client Dumps 100MB of random data.
- Parameters
-
| DataOutputStream | "out" that provides an outgoing connection to the client. |
- Exceptions
-
| IOException | to catch any read/write errors. |
The documentation for this class was generated from the following file:
- src/main/java/com/server/HandleTCP.java