Results 1 to 6 of 6

Thread: how do messengers get notified?

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    UAE
    Posts
    15

    Question how do messengers get notified?

    I'm wondering how do all messenger programs (msn, google, yahoo, ...) notify me when a friend in my contact list sign in?
    do they connect to a server periodically usgin a timer.
    or does the server itself send a notification (data packet to my computer) ? what if my computer is behind a router? how this data reach me without forwarding the ports?
    i do really need to know the answer since i've searched a lot without any helpful result.
    thank u.

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: how do messengers get notified?

    Well they would likely be sending you the notification once the other client (your friend) has connected to the server. And i believe you wouldn't be able to connect in the first place if you didn't have the ports forwarded before hand.

  3. #3
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: how do messengers get notified?

    The IM client typically just keeps a connection open to the server constantly. Notifications are sent over this path by the server.

    Since you're connecting out from your PC there is no need for any ports to be mapped inward.

    Try running netstat -a from a command prompt to see such established connections.

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: how do messengers get notified?

    Quote Originally Posted by dilettante
    The IM client typically just keeps a connection open to the server constantly. Notifications are sent over this path by the server.

    Since you're connecting out from your PC there is no need for any ports to be mapped inward.

    Try running netstat -a from a command prompt to see such established connections.
    Yup. All clients, every person using the messenger is connected to the big server, whether it be MSN, Yahoo, AIM, etc. They all have their own servers.

    No need for ports to be forwarded. You are usually connected to the server (outgoing connection) on one port. When one of your friends comes online the server will send a message to your program over that port saying he/she has come online. Works the same way for chat messages, private messages, etc.

    Your program looks at that data message and determines what kind of data it is, someone coming online, changing their status, a private message, and acts accordingly.

    To see what data you are receiving from the server (aka the protocol) you can use a free program called Ethereal (google it). It will show you all data coming through on that port.

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    UAE
    Posts
    15

    Re: how do messengers get notified?

    Quote Originally Posted by DigiRev
    Yup. All clients, every person using the messenger is connected to the big server, whether it be MSN, Yahoo, AIM, etc. They all have their own servers.
    Thanx dilettante & DigiRev

    Ok, if i had one of those big servers on my home, can i implement the same for a messenger that i developed using VB6 to be connect to my workstation in a lan at my work?
    as i know, the two computers should know each other's real ip to be connected.
    the question still annoying me, how can a big server send any type of data to a client that hasn't real ip because it is behind a router?
    does the server need any special software or hardware to do that?

    thank u again

  6. #6
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: how do messengers get notified?

    Quote Originally Posted by mfgohary
    Thanx dilettante & DigiRev

    Ok, if i had one of those big servers on my home, can i implement the same for a messenger that i developed using VB6 to be connect to my workstation in a lan at my work?
    as i know, the two computers should know each other's real ip to be connected.
    the question still annoying me, how can a big server send any type of data to a client that hasn't real ip because it is behind a router?
    does the server need any special software or hardware to do that?

    thank u again
    In any given connection there is a client and a server. The server sits there and waits/listens for connections. The client is the one that connects (outgoing connection) to the server.

    Once a connection is established, the client and the server can send data to each other without any problems.

    A router won't stand in the way of an outgoing connection, so the client is fine. A router will stand in the way of incoming connections, so that port needs to be opened on the server's router (port forwarding).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width