I am trying to write an FTP client using java.
As far as I understand I need to send my IP adress with PORT command when I need to establish an active connection but, How do I get that IP address?
I am trying to do something like this but it is obviously wrong:
ServerSocket ssock = new ServerSocket();
ssock.bind(null);
ssock.ssock.getLocalPort();
ssock.getInetAddress();
Last line returns null.
So again how can I send my IP address and port to server?
Thank you.