VB 6 Client/server program with multiple clients connected to one server.

I Have created a program for a user that uses "WINSOCK" to connect the client program to the server. The problem is that the user demands to have several clients to connect to one server. How do I make this several or multiple clients to one server? Do I have to Use multiple winsock? if I do, then I would have to open multiple ports and it would slow down the server. What should I use to connect multiple clients to this one server? thankz!
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

YensidModConnect With a Mentor Commented:
Question is PAQ'd and no points refunded.

Community Support Moderator @Experts Exchange
Do a loop checking for the socket.
private sub winsock1_connectionrequest

If Index = 0 Then

'// your code here
'// first connection to client


'// multiple client
varEnviron.SockMax = varEnviron.SockMax + 1

ReDim Preserve arrSockAvi(varEnviron.SockMax)

Load wskSocket(varEnviron.SockMax)

wskSocket(varEnviron.SockMax).LocalPort = _ varEnviron.LocalPort

wskSocket(varEnviron.SockMax).Accept requestID

end if
end sub

First set your winsock control's index value to 0 then
check this example.

Private intMax As Long

Private Sub Form_Load()
   intMax = 0
   sckServer(0).LocalPort = 1001
End Sub

Private Sub sckServer_ConnectionRequest _
(Index As Integer, ByVal requestID As Long)
   If Index = 0 Then
      intMax = intMax + 1
      Load sckServer(intMax)
      sckServer(intMax).LocalPort = 0
      sckServer(intMax).Accept requestID
      Load txtData(intMax)
   End If
End Sub

This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
Bcoloutlaw, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Save as PAQ -- No Refund.

DanRollins -- EE database cleanup volunteer
All Courses

From novice to tech pro — start learning today.