Gambas ServerSocket port limitation

Post your Gambas programming questions here.
Post Reply
ocoquet
Posts: 36
Joined: Friday 18th December 2020 7:56am

Gambas ServerSocket port limitation

Post by ocoquet »

Hi All from France,

Is somebody to know if Gambas Serversocket has a limitation to port numbering ?

It's appear than port < 1023 can't be used, is it a bug or normal feature ?

Regards
Olivier
Olivier Coquet
Gambas Dev
Le Forum développeur Gambas
ocoquet
Posts: 36
Joined: Friday 18th December 2020 7:56am

Re: Gambas ServerSocket port limitation

Post by ocoquet »

I made the answer :D
Ports 1 to 1024 are root usage only :(

regards
Olivier
Olivier Coquet
Gambas Dev
Le Forum développeur Gambas
User avatar
PJBlack
Posts: 187
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Gambas ServerSocket port limitation

Post by PJBlack »

this is not a gambas limitation ...

TCP / UDP ports that have been standardized by the IANA:
Standardized ports: 0 - 1023 (&H0000 to &H03FF)
On Unix-like operating systems, only the root account may operate services that are on ports below 1024.
Registered ports: 1024 – 49151 (&H0400 to &HBFFF)
These ports from No. 1024 to No. 49151 are registered ports . On most systems, these ports can be used by normal users without special rights.
Dynamic port addresses: 49152 - 65535 (&HC000 to &HFFFF)
The port addresses from 49152 is, according to RFC 6335 to dynamic ports that can be used locally by applications and / or dynamic. These connection numbers are not assigned by IANA, so it cannot be ruled out that other applications are already using a port or that the operating system forbids its use.
Post Reply