Home
Categories
Categories:
All Categories
Search...
Suggested keywords
Search
x
Search
New
Start WebSocketServer on a free port
General
Kindox
Wednesday, 03 August 2022
2
Replies
0.9K Visits
Subscribe
Is there any way to don't start a WebSocket server on a specific port but let it to find a free one??? (then I could get it through Port property or Bindings counterpart)
Oldest First
Newest First
Oldest First
Admin
2 years ago
·
#1131
Hello,
Yes, just set Port to zero and the server will choose the first available port that finds.
TsgcWebSocketServer1.Port := 0;
You can know which is the Port selected accessing to the bindings property.
TsgcWebSocketServer1.Bindings.Items[0].Port;
Kind Regards,
Sergio
Kindox
2 years ago
·
#1132
It worked like a charm!
Thanks
Page :
1
There are no replies made for this post yet.
Submit Your Response
Post this reply anonymously so that others would not be able to see your name.
Write
Preview
Attachments
Links
Upload files or images for this discussion by clicking on the upload button below.
Supported:
gif,jpg,png,jpeg,zip,rar,pdf,pas,dfm,dpr,dproj,dpk
· Insert
· Remove
Upload Files
(Maximum 10MB)
Cite your Sources with a URL link to help readers verify facts or find more details.
x
Add Another Link
Reply