Wednesday, 03 August 2022
  2 Replies
  674 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)
1 year 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
1 year ago
·
#1132
It worked like a charm!

Thanks
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf
· Insert · Remove
  Upload Files (Maximum 10MB)