|
-
Jul 31st, 2009, 06:03 AM
#1
Thread Starter
New Member
My Winsock code Limit
Hi, could anyone tell me if my winsock code can handle 180 simultaneous connections?
Private Sub Command1_Click()
'winsock1 is an array
'index (0) of winsock only listens to port
Winsock1(0).Close
Winsock1(0).LocalPort = Text3
Winsock1(0).Listen
End Sub
Private Sub Winsock1_Close(Index As Integer)
Winsock1(Index).Close
Unload Winsock1(Index)
Text2.Text = Index & " DC"
End Sub
Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long)
'we create new winsock index for new connections
Load Winsock1(requestID)
If Winsock1(requestID).State <> sckClosed Then Winsock1(requestID).Close
Winsock1(requestID).LocalPort = Text3.Text
Winsock1(requestID).Accept requestID
Text2.Text = "client connected" & requestID
End Sub
for this code i'am creating winsock1 array with index same with the requestID , the request ID ussualy is arround 1xxx, my question is if my program creates winsock array like for example winsock1(1234) does it mean that my program automatically has 1234 winsocks? or the 1234 is just a name? meaning i only have 2 winsock, the winsock (0) and winsock (1234)?, and does this code can support upto 180 clients?
Tags for this Thread
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
|