AIM Messaging Overview

Basic Outline

The AIM client supports two methods to send text messages to other AIM users. The first is used unless a direct connection has been established, and in this mode, all messages pass through an AIM server.

  1. Alice on Machine 1 establishes a connection to an AIM server
  2. Bob on Machine 2 establishes a connection to an AIM server
  3. Alice wants to send a text message to Bob

In the above process, Alice and Bob have no idea about each other's internet address - it just isn't required. However, all the messages are going through the AIM servers they are connected to. This costs AOL money, and also permits them to see all the messages Alice and Bob are exchanging.

Because of the cost, transferring files requires Alice and Bob to establish a direct connection between each other. Once this is done, as the name implies, data flows directly between Alice and Bob, without the AIM servers being involved - so it doesn't cost AOL any money.

  1. Alice on Machine 1 establishes a connection to an AIM server
  2. Bob on Machine 2 establishes a connection to an AIM server
  3. Alice sends a direct connection establishment message to Bob

If Bob establishes a connection to Alice, then everything is fine, and they have a direct connection established. If Bob's machine can't contact Alice's, the direct connection establishment then proceeds as follows:

  1. Bob's machine times out trying to connect to Alice
  2. Bob's machine sends a message to Alice via the AIM server, containing his internet address, and waits for Alice to connect to him
  3. Alice receives the message from Bob via the AIM server she is connected to, and attempts to connect to Bob

At this point, Alice either successfully connects to Bob, or another timeout happens. If the timeout happens, both Bob and Alice's AIM clients will tell them that the connection couldn't be established.

The Issue Of Address Translation

One reason for Alice and Bob being unable to connect to each other is if there is an Address-Translating firewall between their machine and the AIM server they connect to. In essence, this usually means that their machine cannot be directly reached from anywhere else on the internet. Consider the diagram below:

       Local LAN                  Internet
  [alice]---+-----[firewall]---------------+--[AIM Server Cluster]   |   A.B.C.D           |
            |                              |
  [others]--+                              +--[Bob]

A.B.C.D is the only address that the rest of the internet can contact directly. Unfortunately, in the direct connection setup, Alice's machine doesn't know this, and so uses in her message to Bob.

A Solution: The ReAIM Proxy

The ReAIM proxy is a small program designed to run on (or behind) the firewall shown in the diagram above. It intercepts the messages going from Alice to the AIM servers, and if the message is a direct connection request, it changes the address Alice put in the packet from to A.B.C.D, and keeps track that Alice has a direct connection pending.

When Bob gets the modified message, he connects to A.B.C.D, and the proxy answers. With a little bit of jiggery pokery, the proxy matches up Bob's request with Alice's pending request, and sets up a connection so that Alice and Bob can communicate (almost) directly.

SourceForge Logo