Click here to Skip to main content
15,877,857 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Albert Holguin15-Feb-12 9:42
professionalAlbert Holguin15-Feb-12 9:42 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Erudite_Eric16-Feb-12 0:59
Erudite_Eric16-Feb-12 0:59 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Albert Holguin16-Feb-12 7:18
professionalAlbert Holguin16-Feb-12 7:18 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Erudite_Eric16-Feb-12 20:23
Erudite_Eric16-Feb-12 20:23 
AnswerRe: How to create TCP connections between two clients in different LAN? Pin
Chuck O'Toole15-Feb-12 1:02
Chuck O'Toole15-Feb-12 1:02 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Jochen Arndt15-Feb-12 1:07
professionalJochen Arndt15-Feb-12 1:07 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Erudite_Eric15-Feb-12 1:26
Erudite_Eric15-Feb-12 1:26 
AnswerRe: How to create TCP connections between two clients in different LAN? Pin
Chuck O'Toole15-Feb-12 1:38
Chuck O'Toole15-Feb-12 1:38 
Well, I think we've lost sight of the OP's question,
OP wrote:
I want to let two client create TCP connection. These two clients are in different LAN, and there are firewalls, so these clients do not have WAN IP. But there is a server that these two client can visit.
Is there a way to create TCP connection between two clients through server?

Clearly, he cannot "ping" one another as neither has a "WAN IP", which I take to mean that there is no way to identify the IP of one machine to the other. It is the OP that raises the need for an intermediate "server", which Jochen suggests could provide a Pass-Through from one "LAN" to the other but that pass-through needs to be well thought out and is probably complicated by the firewalls.

Now there are other ways of getting the two machines (I am purposely avoiding calling them "clients") to see each other, including opening ports on the firewall, etc. However, without knowing the nature of the firewalls, it's impossible to provide suggestions. For example, how I'd do it on the Linksys box in my house is very different than how I'd do it on the corporate firewall my company uses (assuming the IT department would even let me do that).

Personally, I'm inclined to cut Jochen a little slack here, his answer was reasonable considering the OP's question.
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Erudite_Eric15-Feb-12 2:55
Erudite_Eric15-Feb-12 2:55 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Albert Holguin15-Feb-12 9:43
professionalAlbert Holguin15-Feb-12 9:43 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
yu-jian15-Feb-12 2:58
yu-jian15-Feb-12 2:58 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Jochen Arndt15-Feb-12 3:33
professionalJochen Arndt15-Feb-12 3:33 
AnswerRe: How to create TCP connections between two clients in different LAN? Pin
Erudite_Eric15-Feb-12 0:37
Erudite_Eric15-Feb-12 0:37 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
yu-jian15-Feb-12 3:02
yu-jian15-Feb-12 3:02 
GeneralRe: How to create TCP connections between two clients in different LAN? Pin
Erudite_Eric15-Feb-12 22:35
Erudite_Eric15-Feb-12 22:35 
AnswerRe: How to create TCP connections between two clients in different LAN? Pin
Richard MacCutchan15-Feb-12 4:00
mveRichard MacCutchan15-Feb-12 4:00 
AnswerRe: How to create TCP connections between two clients in different LAN? Pin
Randor 15-Feb-12 13:26
professional Randor 15-Feb-12 13:26 
QuestionSHA1 encoding using Windows Crypto API with Unmanaged C++ Pin
Cyber Friend14-Feb-12 11:54
Cyber Friend14-Feb-12 11:54 
AnswerRe: SHA1 encoding using Windows Crypto API with Unmanaged C++ Pin
pix_programmer14-Feb-12 20:48
pix_programmer14-Feb-12 20:48 
GeneralRe: SHA1 encoding using Windows Crypto API with Unmanaged C++ Pin
Cyber Friend15-Feb-12 12:16
Cyber Friend15-Feb-12 12:16 
AnswerRe: SHA1 encoding using Windows Crypto API with Unmanaged C++ Pin
Randor 15-Feb-12 13:37
professional Randor 15-Feb-12 13:37 
GeneralRe: SHA1 encoding using Windows Crypto API with Unmanaged C++ [Resolved] Pin
Cyber Friend15-Feb-12 13:41
Cyber Friend15-Feb-12 13:41 
Questionfopen increment Pin
manju 314-Feb-12 3:16
manju 314-Feb-12 3:16 
AnswerRe: fopen increment Pin
Maximilien14-Feb-12 4:16
Maximilien14-Feb-12 4:16 
AnswerRe: fopen increment Pin
«_Superman_»14-Feb-12 16:15
professional«_Superman_»14-Feb-12 16:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.