How can I create a simple game with two players that communicates over the Internet?
I need to solve the problems:
search or rendezvous - two players want to find each other.
current communications. Any player can initiate an action requiring the delivery of information to the other side, in a reasonably fast timeframe (delay in the IM type, and not a delay in the type of email).
In this regard, I believe this is equivalent to a two-way chat, where people want to find each other, and then also, after spam, communicate with each other.
Additional requirements:
Suppose the endpoints are Windows OS, relatively recently.
Assume that no end machine is directly accessible from the Internet. Suppose these are client machines hidden behind firewalls that block incoming requests. Machines can perform outgoing requests. (say over HTTP, but TCP is fine too)
communication must be confidential. For simplicity, let me say that a common secret already exists, and endpoints are capable of performing AES. I assume that I mean that any intermediary should not decrypt message packets. Decryption will only happen at the end points.
all user code should only run on client computers.
Suppose my computer does not have a server on the Internet.
I am pleased to use third-party servers to facilitate interaction, for example, with an IM server or something else, as long as it is free, and I do not need to install custom code on it.
What APIs are available to facilitate this design?
Can I do this using the IM API? WCF? Are there WCF feeds for Windows Messenger?
What are the protocols? HTTP? I have it marked as "peer-to-peer", but I mean it in practice; There is no strict requirement for the formal p2p protocol.
What message formats would you use?
EDIT
To clarify server requirements, I want NO MY SERVER under MY CONTROL. AND NO MY INDIVIDUAL CODE FOR ANY SERVER. This is not the same as No Server.
Think of it this way: I can send an email via SMTP using a special code that I write on the send and receive side. My user code can connect through the broker of a free SMTP server. This does not require code installation on the SMTP server. This is what I want, but SMTP is not acceptable due to latency.
EDIT2
I also found this: an instant messaging library like libpurple, but written in C #
ANSWER
I can do what I want using the libraries for IM frameworks. One easy way to do this with Windows Live Messenger is to use the Activity Activity SDK . This proves the concept, but is not really a general solution. But similar things can be done with IM libraries for various messaging systems like libpurple or using libs for IRC channels. In all of these cases, the instant messaging servers act as the communications infrastructure that penetrates the firewall.
source share