Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Peter Rachow - VisualBasic - Connect to winsock

0 views
Skip to first unread message

check

unread,
Feb 13, 2011, 12:46:00 PM2/13/11
to
Function ConnectServer(strServer As String)

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

0 new messages