Connecting a Newsserver
Found a cool Function to connect to e NMTP-Server (C) Peter Rachow from
germany
Function ConnectServer(strServer As String) '(C) 2009 Peter Rachow
Dim lngSecsOld As Long
Call SysMsg("Connecting: " & 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("Time out.")
ConnectServer = 0
Exit Function
End If
Loop
Else
Call SysMsg("Connection alredy exists.")
ConnectServer = 0
Exit Function
End If
ConnectServer = 1
End Function
You need a Winsock-Control wskNMTP and a function to Show SysMsgs (can
either be a MsgBox or e listbox or sth).
Have fun!
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735