public class ProFTPActiveDataSocket
extends java.lang.Object
implements com.enterprisedt.net.ftp.internal.FTPDataSocket
| Modifier and Type | Field and Description |
|---|---|
protected StreamSocket |
acceptedSock
The socket accepted from server.
|
static java.lang.String |
cvsId
Revision control id
|
protected int |
sendBufferSize |
protected ProxyServerSocket |
sock
The underlying socket for Active connection.
|
| Constructor and Description |
|---|
ProFTPActiveDataSocket(ProxyServerSocket sock)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
acceptConnection()
Waits for a connection from the server and then sets the timeout when the
connection is made.
|
void |
close()
Closes underlying sockets
|
void |
closeChild()
Closes child socket
|
void |
connect() |
java.io.InputStream |
getInputStream()
If active mode, accepts the FTP server's connection - in PASV, we are
already connected.
|
java.net.InetAddress |
getLocalAddress()
Returns the local address to which this socket is bound.
|
int |
getLocalPort()
Returns the local port to which this socket is bound.
|
java.io.OutputStream |
getOutputStream()
If active mode, accepts the FTP server's connection - in PASV, we are
already connected.
|
void |
setReceiveBufferSize(int size)
Set the size of the data socket's receive buffer.
|
void |
setSendBufferSize(int size)
Set the size of the data socket's send buffer.
|
void |
setTimeout(int millis)
Set the TCP timeout on the underlying data socket(s).
|
public static java.lang.String cvsId
protected ProxyServerSocket sock
protected StreamSocket acceptedSock
protected int sendBufferSize
public ProFTPActiveDataSocket(ProxyServerSocket sock)
sock - the server socket to usepublic void connect()
throws java.io.IOException
connect in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOExceptionpublic void setTimeout(int millis)
throws java.io.IOException
setTimeout in interface com.enterprisedt.net.ftp.internal.FTPDataSocketmillis - The length of the timeout, in millisecondsjava.io.IOExceptionpublic void setReceiveBufferSize(int size)
throws java.io.IOException
setReceiveBufferSize in interface com.enterprisedt.net.ftp.internal.FTPDataSocketsize - must be > 0java.io.IOExceptionpublic void setSendBufferSize(int size)
throws java.io.IOException
setSendBufferSize in interface com.enterprisedt.net.ftp.internal.FTPDataSocketsize - must be > 0java.io.IOExceptionpublic int getLocalPort()
getLocalPort in interface com.enterprisedt.net.ftp.internal.FTPDataSocketpublic java.net.InetAddress getLocalAddress()
getLocalAddress in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOExceptionprotected void acceptConnection()
throws java.io.IOException
java.io.IOException - There was an error while waiting for or accepting a
connection from the server.public java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOExceptionpublic void closeChild()
throws java.io.IOException
closeChild in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOExceptionCopyright © 2001-2014 Enterprise Distributed Technologies Ltd. All Rights Reserved.