How Instant Messaging Works Behind the Screen

IM clients aren't as simple as they appear

Two people using smartphones to message

Getty Images 

Instant messaging (IM) programs like WhatsApp and Facebook Messenger deliver billions of messages to people each day. While sending these messages seems instantaneous and seamless, there's much more to it than meets the eye.

While the terms instant messaging and chat are used interchangeably, they're two different things. With instant messaging, people who know each other send text-based messages back and forth. Chat takes place in online locations where people who typically don't know each other discuss (using text-based messages) topics of mutual interest.

Choose an IM Client

When you join an IM network, you must choose a client, or program, which creates a connection between your computer and a network server. There are several types of IM clients, including:

  • Single-protocol: Based on a single application.
  • Multiprotocol: Connects many IM accounts into one interface.
  • Web-based: Used with an internet browser.
  • Enterprise: Designed for business use.
  • Mobile app: Designed for use on a mobile device.

Verify Your Account

No matter which IM client you use, the steps to connect you to your account and contact list are the same. This connection typically occurs within seconds.

Illustration: Your PC or Device, Screen Name & Password, Server

Here's how the IM client verifies your account:

  1. Using your internet connection, the IM client communicates with the network server.

  2. Once the two are connected, enter your user ID and password to log in to the network (the user ID is created when you sign up to join the IM service).

  3. The user ID and password information are sent to the server, which checks to ensure the login information is correct and the account is in good standing.

View Your Account

After you're signed in, you'll receive information from the IM client server. This happens within seconds.

How Instant Messaging Works

Here's how the server sends your account and messages to your computer:

  1. The server gathers your contact list data, including notifications of which contacts are signed in and available to message.

  2. The server sends the data to your device in multiple units called packets, which are small bits of information.

  3. Your IM client collects, organizes, and presents your live and offline friends from your contact list.

  4. The collection and distribution of information between your computer and the network server are continuous and instantaneous, making the speed and convenience of messaging possible.

Send and Receive IMs

With the contact list now open and ready for a communication session, sending an IM is a breeze.

How Instant Messaging Works

Here's how to IMs are sent and received:

  1. When you double-click a contact name, the client produces a window in which you can communicate with that user. To send an IM, type your message in the text field and press Enter.

  2. The client breaks your message into packets, which are delivered to the recipient's device.

  3. As you and your contact send messages back and forth, the messages appear within a split second of being sent.

    In addition to text-based messages, you can transmit video, audio, image, and text files quickly and directly.

  4. If you have IM logging enabled, a history of the conversation is created and stored either on your computer or on the network server.

Sign Out

When you complete your conversation, sign out of the IM client. When you sign out, the IM client takes steps to ensure that you no longer receive messages from contacts.

How Instant Messaging Works

Here's what happens when you close the IM client:

  1. When the IM client is closed, it directs the network server to end your connection.

  2. The server stops transmitting messages from contacts to your computer or device.

  3. The network updates your availability and shows your contacts that you're offline.

  4. Incoming messages are stored as offline messages. You'll receive these messages when you sign in to the service.