All Classes Functions Variables
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
com.server.HandleTCP Class Reference

This class to manage upload and download requests via TCP. More...

Inheritance diagram for com.server.HandleTCP:

Public Member Functions

 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.
 

Private Member Functions

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...
 

Private Attributes

Socket client
 
final int whichPort
 

Static Private Attributes

static final int BYTES_IN_MEGABYTES = 1048576
 

Detailed Description

This class to manage upload and download requests via TCP.

Author
Christopher Jordan , William Daniels
Version
1.1

Constructor & Destructor Documentation

com.server.HandleTCP.HandleTCP ( Socket  client,
int  whichPort 
)
inline

Constructor for TCP Handler.

Parameters
Socket"client" for connection
Int"whichPort" for connection

Member Function Documentation

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
IOExceptionto catch any read/write errors.

The documentation for this class was generated from the following file: