[Lazarus] Detecting new connection

Antonio Fortuny a.fortuny at sitasoftware.lu
Fri Jan 31 13:31:20 CET 2014


Le 31/01/2014 11:40, Santiago A. a écrit :
> Hello:
>
> I have a program on Laptop that when network is active (there is a WIFI,
> ie) must do some tasks (in fact check for updates).
>
> Is there any standard way to do so, without continuously  pooling if it
> can connect to Internet?
>   
A standard way to check this I don't know any. I don't even know if an 
appication can catch events sent by the OS when a network connection 
raises..
I've made an application wich polls the network for a TCP/IP target : 
once at the application load and then on a regular basis. to have it as 
a standard as possible (from my point of view), I'built a service which 
runs on Win32, Win64, Linux x86_64 and WinCE.
It is almost standard for all platforms as it uses Indy sockets and 
potocols on both sides: update server and targets. The only exception is 
the WinCE application wich connects to a local server to check for a new 
version. But all TCP/IP prorocol is coded in one FPC unit and compiled 
using Lazarus in all applications that need it.

Antonio.




---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com






More information about the Lazarus mailing list