|
-
Jul 2nd, 2000, 02:26 PM
#1
Thread Starter
Member
Hi,
Can someone please look at this code and tell me why it is not working. I am trying to accecpt multi connections via winsock.I have one winsock control named wsock1 which listens on port 5000 for connections and wsock2 for data send/recv. Everytime the second person trys to login into the server, it fails and never runs the connection_request event. The client sits at wsock1.state=6
Here is my code
Private Sub wsock1_ConnectionRequest(ByVal requestID As Long)
dim newport as integer
newport = -1
For x = 0 To wsock2.Count - 1
If wsock2(x).State = 0 Then newport = x: Exit For
Next
If newport = -1 Then Load wsock2(wsock2.Count):newport=wsock2.Count - 1
wsock2(newport).Accept requestID
wsock1.Close
wsock1.Listen
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
|