PDA

Click to See Complete Forum and Search --> : Single Port, Multiple winsock connections


Cahlel
Mar 7th, 2001, 11:40 AM
Is it possible to have more than two connections over a single port using 1 or more winsock(s)?

And if so, does it have to be TCP or UDP protocol

dungism
Mar 9th, 2001, 12:36 PM
Yes, it's possible to have multiple connections on 1 port and it's TCP/IP. For less work, you can use Microsoft Winsock Component, which is very to use. Put it in project, put it in an array, and use based index to listen. ex:

Winsock1(0).Listen

In the connection request id event, load another instance of the winsock object and accept the socket ID.

Load Winsock1(Winsock1.Ubound+1)
Winsock1(Winsock1.Ubound).Accept RequestID

Then you can communicate w/ multiple connections on 1 port.