David really has the key bit here:

> You can have one application bind itself to port 192.168.1.1:5000 and
> another application bind itself to port 192.168.1.2:5000.
>
> However, if your application binds itself to ALL IP's on port 5000
> (0.0.0.0:5000) no other application can bind itself to port 5000 on
> any IP.

Each application that binds to a port does so either to * (All IPs) or to a specific IP.

If it picks * then it blocks any other application from using that port on ANY IP address.

NOT all applications allow binding to an address they simply pick * always.

- Larry "DrFranken" Bolhuis

www.Frankeni.com
www.iDevCloud.com - Personal Development IBM i timeshare service.
www.iInTheCloud.com - Commercial IBM i Cloud Hosting.

On 5/28/2019 9:05 AM, David Gibbs via MIDRANGE-L wrote:
On Tue, May 28, 2019 at 7:48 AM Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:
That's what I assumed, and what Wikipedia shows. OTOH I received a private reply saying
that ports must be unique across an entire server. I guess I'll build a test and find out.

Assuming you have a machine that has IP addresses 192.168.1.1 &
192.168.1.2 assigned...

You can have one application bind itself to port 192.168.1.1:5000 and
another application bind itself to port 192.168.1.2:5000.

However, if your application binds itself to ALL IP's on port 5000
(0.0.0.0:5000) no other application can bind itself to port 5000 on
any IP.

david


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.