Re: FTP data connection

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 04/29/04


Date: Thu, 29 Apr 2004 11:48:30 -0400

In article <c6q8c2$3dg$1@reader1.imaginet.fr>,
 "Christian" <cgregoir99@yahoo.com> wrote:

> "those who know me have no need of my name" <not-a-real-address@usa.net>
> wrote in message news:m1ekq7hq86.gnus@usa.net...
> > in comp.unix.programmer i read:
> >
> > >When ftp'ing to a host, in active mode, the FTP server then connects back
> to
> > >the client using the TCP port 20 to send the data, no matter how many
> > >connections are opened. Each one sees data coming from port 20.
> > >
> > >How is it performed programmatically ? I'm writing a FTP server, and i
> can't
> > >figure out how to connect to the client, given the port it sent me, using
> > >always the same port.
> >
> > call bind before connect.
>
> You mean that the FTP server will have to bind() to TCP port 20 for every
> connection it makes back to the client ? I reckon that from the second call
> on, it will fail, won't it ?

It should use SO_REUSEADDR. Since the remote port will be different for
each connection, there's no reason for it to fail.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: Active Directory multiple simultaneous binds on same ldap connection
    ... You can bind multiple times on a single connection, however, it is not thread ... Joe Richards Microsoft MVP Windows Server Directory Services ...
    (microsoft.public.win2000.active_directory)
  • Re: Active Directory multiple simultaneous binds on same ldap connection
    ... You can bind multiple times on a single connection, however, it is not thread ... Joe Richards Microsoft MVP Windows Server Directory Services ...
    (microsoft.public.windows.server.active_directory)
  • Re: ADAM - New users reading data - best practices
    ... You bind to the directory (or the connection to the ... AUTHENTICATED USERS built-in security principal for your ACL entries. ...
    (microsoft.public.windows.server.active_directory)
  • RE: How to bind passthru to NDIS USB driver ?
    ... Has no-one tried to bind an NDIS intermediate driver to anything other than ... but not to the USB devices. ... > and act like an ethernet connection over an ethernet NIC. ... How do I get a passthru sample driver to bind to the ...
    (microsoft.public.development.device.drivers)
  • Re: Binding to ADAM from LDP
    ... why can't you use a connection based connection? ... should be able to specify a bind ID with a blank password (not that I recommend ... >>Joe Richards Microsoft MVP Windows Server Directory Services ...
    (microsoft.public.win2000.active_directory)