• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

How does ICQ know a connection was made?

I can see that the ICQ program has an agent that "knows"
when a network connection was made (through dial-up,LAN etc.).
How do they do that (from their source code)?
Thanks.
0
gilbert_chang
Asked:
gilbert_chang
  • 5
  • 2
  • 2
  • +2
1 Solution
 
thresher_sharkCommented:
I don't know how THEY do it.  I suspect they just continually try to ping a server (like mirabilis.com) until it is successful.  Then ICQ connects.  If you want source code for pinging a server, I think I can provide it.
0
 
gilbert_changAuthor Commented:
I would appreciate it.
Thanks.
0
 
yonatCommented:
No, they use the RAS API. Take a look at RasConnectionNotification API function.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
thresher_sharkCommented:
It looks like yonat's solution is better, but in case you want a ping sample, go here:

http://www.codeguru.com/network/ping.shtml
0
 
darklightCommented:
What about for MFC ?
0
 
yonatCommented:
What about it? This is a simple API function, not something you need a class wrapper for.
0
 
yonatCommented:
The API function RasConnectionNotification() will allow you to be notified when a connection is made.
0
 
gilbert_changAuthor Commented:
RasConnectionNotification() only lets me know when a new RAS connection is made. What about other connections (Not dial-up),
Such as LAN connections?
Thanks.
0
 
yonatCommented:
You'll need to write a WinSock "Layered Service Provider" for that. This is much more complicated. If you really want to do that, see http://www.sockets.com/winsock2.htm .
0
 
yonatCommented:
BTW, ICQ does use RasConnectionNotification() (I know some people from Mirabilis...)
0
 
MirkwoodCommented:
Bought This Question.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 5
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now