public class FtpSocketFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
protected FtpServerChannel |
m_Channel |
protected ServerSocket |
m_DataServerSocket |
protected InetAddress |
m_LocalHost |
protected int |
m_LocalPort |
protected InetAddress |
m_RemoteHost |
protected int |
m_RemotePort |
protected static IfsLogger |
s_Logger |
| Constructor and Description |
|---|
FtpSocketFactory(FtpServerChannel channel,
InetAddress localHost,
int localPort,
InetAddress remoteHost,
int remotePort) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeDataServerSocket()
Close the data ServerSocket.
|
Socket |
getConnection(FtpServer server)
Returns a Socket for data transfer.
|
void |
setActive(int remotePort)
Using the PORT command, manually set the remote port.
|
int |
setPassive()
A PASV request asks the server to accept a data connection on a new TCP
port selected by the server.
|
protected static IfsLogger s_Logger
protected ServerSocket m_DataServerSocket
protected InetAddress m_RemoteHost
protected int m_RemotePort
protected InetAddress m_LocalHost
protected int m_LocalPort
protected FtpServerChannel m_Channel
public FtpSocketFactory(FtpServerChannel channel, InetAddress localHost, int localPort, InetAddress remoteHost, int remotePort)
public int setPassive()
throws IOException
IOExceptionpublic void setActive(int remotePort)
throws Exception
Exceptionpublic Socket getConnection(FtpServer server) throws Exception
Exceptionpublic void closeDataServerSocket()
throws IOException
IOExceptionCopyright © 2025. All rights reserved.