I’m sorry if this question has been asked before, but the idea is hard to formulate. I can understand how two computers can directly interact by listening to open ports and sending information directly to IP addresses. However, I want to know how applications like LogMeIn or chat applications communicate (through port 80 I’m guessing because it is always open, but you aren’t allowed to listen to it), or even games (If they don’t open a port). If I was to guess, I would think that they use a third party web server with a database that mediates the transfer of information between the computer by “GET”ing and “POST”ing requests. That would probably make the communication asynchronous.
I don’t care if I get a bad rating for this question so long as I can get an answer, even if it is just a link to somewhere else that has the answers. Also, I work in C++ mainly and I am familiar with TCP and HTTP protocols.
Yes, generally there is a ‘server’ that multiple clients connect to. The server accepts messages from one client and forwards it to one or more other clients. This is almost always ‘asynchronous’ but that can mean a few things (whether it is done that way on the client or server, whether the server is ‘event driven’ or multithreaded, etc). The server can be a web server, but other kinds exist (Jabber servers for example, which use XMPP, usually [or often] on port 5222).
Some messengers work over HTTP (usually port 80, usually open) and even when a protocol usually uses a different port, a ‘web gateway’ can be written to communicate over port 80 and HTTP to avoid problems with other ports being blocked, and it can forward to the ‘standard server’ or re-implement it entirely. Especially in corporate environments, internet access can be me mediated by an HTTP proxy server so using a gateway or native HTTP messaging apps/protocols is the only option.
I guess it’s important to define ‘server’ correctly for these discussions. Often the term is used to describe an actual computer, sitting in a data center or something. But when we talk about a ‘web server’ or ‘jabber server’ we usually mean a software daemon that is a piece of software who’s job it is to listen for client connections and act on the messages it receives.