vidz7
asked on
Peer to peer tcp connection
Hi experts
I want to do the following, please tell me if it's possible.
i hv written a messenger in java and now need to implement File Transfer. Say ClientA wants to trasfer a file to ClientB. What i was thinking of doing was to make ClientA open a ServerSocket and wait for ClientB to connect. ClientB will be given the IP and PORT of ClientA by a server in between. Once ClientB gets the IP/PORT of ClientA it creates a new socket and connects to ClientB. After the connection is established, ClientA pushes the file to ClientB.
i need to know
1) Will this work if ClientA is NOT behind a firewall but ClientB is.
2) What happens if ClientA is behind a firewall and ClientB isn't
3) What if both are behind a firewall
4) If ClientA accesses the internet through a router and has a static IP assigned to it in the intranet, what IP will ClientB need to have to access ClientA. Basically how will the IP be resolved?
Thnx in advance
vidya
I want to do the following, please tell me if it's possible.
i hv written a messenger in java and now need to implement File Transfer. Say ClientA wants to trasfer a file to ClientB. What i was thinking of doing was to make ClientA open a ServerSocket and wait for ClientB to connect. ClientB will be given the IP and PORT of ClientA by a server in between. Once ClientB gets the IP/PORT of ClientA it creates a new socket and connects to ClientB. After the connection is established, ClientA pushes the file to ClientB.
i need to know
1) Will this work if ClientA is NOT behind a firewall but ClientB is.
2) What happens if ClientA is behind a firewall and ClientB isn't
3) What if both are behind a firewall
4) If ClientA accesses the internet through a router and has a static IP assigned to it in the intranet, what IP will ClientB need to have to access ClientA. Basically how will the IP be resolved?
Thnx in advance
vidya
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
where is vidz7 ?
vidz7 logged in days after I posted this request and chose not to respond so I will force accept this to close it. I can only assume that your information served the need.
In the event Asker returns with additional needs here, please respond.
Thanks,
Moondancer
Community Support Moderator @ Experts Exchange
In the event Asker returns with additional needs here, please respond.
Thanks,
Moondancer
Community Support Moderator @ Experts Exchange
how to resolve the fourth of the questions posted by vidz7??????
Few additional experts will join this collaboration effort, once a question has been locked. Just want to confirm this to you. If more than one expert helps you, you can always split points or award additional help in a new question, within the same topic area. If you need help from us, post a zero point question here, and include the link:
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
Moondancer
Community Support Moderator @ Experts Exchange