Dim lngSecsOld As Long
Call SysMsg("Verbinde zu Server: " & strServer)
If frmMain.wskNMTP.State = sckClosed Then
frmMain.wskNMTP.RemotePort = 119
frmMain.wskNMTP.RemoteHost = strServer
frmMain.wskNMTP.Connect
intRxModeNMTP = RXM_CONNECT
lngSecsOld = lngSecs
Do While intRxModeNMTP = RXM_CONNECT
DoEvents
If lngSecs > lngSecsOld + TIMEOUTSECS Then
frmMain.wskNMTP.Close
Call SysMsg("Zeitueberschreitung.")
ConnectServer = 0
Exit Function
End If
Loop
End If
ConnectServer = 1
End Function