For the time being I’ve got this implemented now. As far as I tested and measured this consumes the lowest cpu-time.
[quote] // polling in seperate thread
mPollingReady = false
Dim TCPSocket1 As New TCPSocket
TCPSocket1.Address = mPollUrl // 173.194.67.138 = google
TCPSocket1.Port = 80
TCPSocket1.Connect
While Not TCPSocket1.IsConnected
If TCPSocket1.LastErrorCode <> 0 then Exit
TCPSocket1.Poll
Me.Sleep(100,false)
Wend
InternetConnected = TCPSocket1.IsConnected
mPollingReady = True
TCPSocket1.Close[/quote]