|
-
Jan 21st, 2007, 06:36 PM
#1
Thread Starter
Junior Member
Server Checker
I am trying to create a program what checks that my pop3 server is still running, using Winsocket.
Has anyone got any better ways of doing it or sugestions.
-
Jan 21st, 2007, 07:29 PM
#2
Re: Server Checker
thats easy, use the winsock control, project>compnants>microsoft winsock control. add a button and winsock to the form and put:
VB Code:
Private Sub Command1_Click()
Winsock1.Close
Winsock1.Connect "pop.tiscali.co.uk", 110
End Sub
Private Sub Winsock1_Close()
Winsock1.Close
MsgBox "Server terminated the connection"
End Sub
Private Sub Winsock1_Connect()
Winsock1.Close
MsgBox "The server is alive"
End Sub
Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Winsock1.Close
MsgBox "Server is down"
End Sub
Click the button to check if the server is alive or not
-
Jan 23rd, 2007, 06:03 AM
#3
Thread Starter
Junior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|