I am new to socket progamming and I am trying to implement a stripped down FTP like program.
It uses two TCP connections, one as a control connection and other as a data connection. The problem is that I do not know how to use the sever to connect to the client’s N+1 port using its port 20. Please refer here, to fund out more.
I am new to socket progamming and I am trying to implement a stripped
Share
To create the active mode data connection, you:
getsockname();socket();bind();connect().Note that the
bind()will likely fail if your daemon is not running as root, because binding a low port number is a privileged operation.