Listen on 2 or more ports at once?

Dar Scott dsc at swcp.com
Sat Apr 16 13:16:39 EDT 2005


On Apr 16, 2005, at 12:45 AM, Brian Yennie wrote:

>> Is it possible to use "accept connections" to accept connections on 
>> two or
>> more ports at once? Or are we limited to one "accept"?
>
> You should be able to listen on as many ports as you like, provided 
> that they aren't already already in use by another application on the 
> same machine.

Avoid listening on low port numbers.

You can even listen on the same port number in UDP and TCP, but 
unfortunately you can't tell them apart in openSockets and it is hard 
to control which one you close when you close.  That is usually no 
problem when you open and close them as a pair (just close twice), as 
in providing a service that is available on both UDP and TCP.

Dar
A pig's gotta fly.



More information about the use-livecode mailing list