Results 1 to 4 of 4

Thread: Ports and Winsock

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    5

    Thumbs down

    How do I check if a port is open. How do I close a port.
    Whenever I get a winsock error I have to restart my computer before I can connect again.

  2. #2
    hum...for the winsock control add for close property winsock.close and add that for the error too...make sure it closes the port when it exits...(both for server and client)
    ------------------------------
    Hello super nintendo Chalmers. By: Ralph Wiggum
    ------------------------------

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    5

    COM Ports

    I am already checking if the winsock is closed. I need to know how to close ports that the modem is using.....

  4. #4
    Lively Member
    Join Date
    Mar 2000
    Posts
    103
    Private Sub wskClient_Close()
    wskClient.Close
    End Sub

    Private Sub wskClient_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)
    wskClient.Close
    End Sub

    or anywhere in your program...

    form.wskClient.close

    or if you want to close a port that is currently open...

    if wskClient.state <> sckClosed then wskClient.close

    when you get that error just use your immediate window in debug mode to close the port off.

    wskClient.LocalPort = 6969
    wskClient.Close

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