Class Communication

java.lang.Object
   |
   +----Communication

public class Communication
extends Object
The Communication class permits communication of sockets


Variable Index

 o Client
The socket used for communications with the client.
 o Data
The socket used for data transmission with the client.
 o FTP_NEWLINE
 o Log

Constructor Index

 o Communication()
 o Communication(Socket)

Method Index

 o GetCommand()
Waits for a command from the user.
 o IsAlive()
Verifies the current connection is still valid.
 o SendResponse(String)
Sends an arbitrary string to the client
 o SetDataSocket(Socket)
Sets the data socket (such as in response to a PORT command)

Variables

 o Client
 private Socket Client
The socket used for communications with the client.

 o Data
 private Socket Data
The socket used for data transmission with the client.

 o Log
 private FTPLog Log
 o FTP_NEWLINE
 static final int FTP_NEWLINE

Constructors

 o Communication
 public Communication()
 o Communication
 public Communication(Socket ClientSocket)

Methods

 o GetCommand
 public FTPCommand GetCommand()
Waits for a command from the user. Creates a new FTPCommand object and returns the command inside of it.

 o SendResponse
 public void SendResponse(String Response)
Sends an arbitrary string to the client

 o IsAlive
 public boolean IsAlive()
Verifies the current connection is still valid.

 o SetDataSocket
 public void SetDataSocket(Socket DataSocket)
Sets the data socket (such as in response to a PORT command)