|
|
|
@ -96,6 +96,9 @@ public class ftpc {
|
|
|
|
|
// client socket for commands
|
|
|
|
|
private Socket ControlSocket = null;
|
|
|
|
|
|
|
|
|
|
// socket timeout
|
|
|
|
|
private int ControlSocketTimeout = 300000;
|
|
|
|
|
|
|
|
|
|
// socket for data transactions
|
|
|
|
|
private ServerSocket DataSocketActive = null;
|
|
|
|
|
private Socket DataSocketPassive = null;
|
|
|
|
@ -1187,6 +1190,7 @@ cd ..
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
ControlSocket = new Socket(cmd[1], port);
|
|
|
|
|
ControlSocket.setSoTimeout(this.ControlSocketTimeout);
|
|
|
|
|
clientInput = new BufferedReader(new InputStreamReader(ControlSocket.getInputStream()));
|
|
|
|
|
clientOutput = new DataOutputStream(new BufferedOutputStream(ControlSocket.getOutputStream()));
|
|
|
|
|
|
|
|
|
@ -1795,6 +1799,14 @@ cd ..
|
|
|
|
|
if (Integer.parseInt(reply.substring(0, 1)) == 5) throw new IOException(reply);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getTimeout() {
|
|
|
|
|
return this.ControlSocketTimeout;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setTimeout(int timeout) {
|
|
|
|
|
this.ControlSocketTimeout = timeout;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ee extends SecurityException {
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|