Results 1 to 3 of 3

Thread: Server Checker

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Location
    Rotherham,UK
    Posts
    26

    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.

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    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:
    1. Private Sub Command1_Click()
    2.     Winsock1.Close
    3.     Winsock1.Connect "pop.tiscali.co.uk", 110
    4. End Sub
    5.  
    6. Private Sub Winsock1_Close()
    7.     Winsock1.Close
    8.     MsgBox "Server terminated the connection"
    9. End Sub
    10.  
    11. Private Sub Winsock1_Connect()
    12.     Winsock1.Close
    13.     MsgBox "The server is alive"
    14. End Sub
    15.  
    16. 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)
    17.     Winsock1.Close
    18.     MsgBox "Server is down"
    19. End Sub

    Click the button to check if the server is alive or not
    Chris

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Location
    Rotherham,UK
    Posts
    26

    Re: Server Checker

    thanks for that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width