Name: dbT83986 Date: 02/17/99
Implementing FTP Server. When FTP client sends 'PORT' command,
I must create a 'new Socket(clientInetAddress, clientPort, myInteAddress, 20)'
The 20 is required so that some firewalls allow the TCP connection through as legal FTP, else the firewall rejects it.
This works ok, but since the Socket binds to port 20, I can only have one thread activly sending data to a client at a time, effectivly single threading the FTP server. (Other threads throw an 'address in use' exception.)
If I could do it but NOT 'bind' the local port, I could multi-thread the server.
I am not in control of the client side at all, so telling clients to use FTP 'PASV' mode is not an option. (Where the client initiates the data connection instead of the server.)
Thanks,
Dave Hubbard
###@###.###
(Review ID: 53006)
======================================================================
- duplicates
-
JDK-4137483 ServerSocket/Socket: Need SO_REUSEADDR option for sockets / server sockets
-
- Closed
-