Results 1 to 2 of 2

Thread: inconsistent connectionRequest

  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.

  2. #2
    New Member
    Join Date
    Sep 2005
    Posts
    9

    Re: inconsistent connectionRequest

    the same thing happends to me... I don't know why... if u can find the solution, please contact me.

    PS: the port isn't the problem... i tried on many ports and all of them had the same problem...

    this happends when more people try to connect at the same time... i think
    Last edited by aneu; Oct 12th, 2005 at 04:20 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