Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4212400

Need Socket class to fill in 'local port' in TCP header without binding to it.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.6
    • core-libs
    • x86
    • windows_nt



      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)
      ======================================================================

            Unassigned Unassigned
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: