Forum Moderators: bakedjake
Computer one is listening (server), so computer two (client) sends a message with its IP to computer one. Then both computers exchange data, one acts as a client, while the other one is the server, and when it has to go the other way, then one acts like the server and the other one as the client.
The problem is that both of them are client and server at the same time, it this the one to develop a program? or is it other solutions as having the client to be only the client, but at the same time to be able to recevie data?
The problem is that both of them are client and server at the same time
Exactly what makes you think it's a problem?
The concept of client-server is not written in stone. It's just a programming paradigm.
With your design you're effectively using the peer-to-peer paradigm. It's just a different structure, not better or worse. Of course it will scale in a different fashion than a server-client implementation, but you're only linking two machines.
It all depends on your long term requirements.
The server listens in port 6180. A firewall allows a client to send data out site the internal network, but if the server is also insite an other network, behind a firewall, then how this data is supposed the reach the server?
Well, I was thinking some how to use port 80, but I have no clue on to do this.
Does anyone has an idea of how to avoid firewalls for my client-server application?
I don't need to create a program that starts acting as a "client" and then when it is ready to get some information it should act as a "server".
My program works in that way, you start the program, then the client send some information, but at the same time the server in the same program is listening for some data to arrive.
What you said is that a "client" can send and receive data, so does the "server", is that what you mean?
I believe the answer is "YES", then do you have some simple code for a win32 application that I can study and see gow it works.
My program works in c++ builder, so the client and server functions are already built.