Results 1 to 2 of 2

Thread: inconsistent connectionRequest

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Resolved inconsistent connectionRequest

    below is my server side winsock listen for connection...but that is happen inconsistent where some time accept connection , sometime couldnt get connection, why this happen??? it is the number port i use?
    VB Code:
    1. connect = 0
    2.     connectWinsock(0).LocalPort = 10000
    3.     connectWinsock(0).Listen
    4.  
    5. Private Sub connectWinsock_ConnectionRequest(Index As Integer, ByVal requestID As Long)
    6.    
    7.     connect = connect + 1
    8.    
    9.     Load connectWinsock(connect)
    10.     connectWinsock(connect).Close
    11.     connectWinsock(connect).Accept requestID
    12.    
    13.     connectWinsock(connect).SendData ("Connected")
    14.    
    15. End Sub
    16.  
    17. Private Sub connectWinsock_DataArrival(Index As Integer, ByVal bytesTotal As Long)
    18.  
    19.     Dim state As String
    20.     connectWinsock(Index).GetData state
    21.    
    22.     List3.AddItem (state & vbTab & vbTab & connectWinsock(Index).RemoteHostIP)
    23.     List1.AddItem (state & " just sign In!")
    24.    
    25.     Call buddyDictionary.Add(state, connectWinsock(Index).RemoteHostIP)
    26.    
    27. End Sub
    Last edited by kenny_oh; Oct 14th, 2005 at 05:51 AM.

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