|
-
May 30th, 2007, 12:23 AM
#1
Thread Starter
New Member
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.
-
May 30th, 2007, 02:27 AM
#2
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.
-
May 30th, 2007, 04:19 PM
#3
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.
-
May 30th, 2007, 08:15 PM
#4
Re: how do messengers get notified?
 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.
-
May 30th, 2007, 11:33 PM
#5
Thread Starter
New Member
Re: how do messengers get notified?
 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
-
May 31st, 2007, 03:58 AM
#6
Re: how do messengers get notified?
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|