Questions regarding WebApplication & Sockets

Greetings all,

I have tried to find the answer to my question, however I fear my Google 'Fu has failed me.
After reading WebApplication — Xojo documentation, (which is informational, however) I have a few questions that I was not able to find.

My questions pertains to WebApplications framework &:
1.) obtaining current Socket count
- is this built into the framework to obtain?
- Or should I be looking at the underlying Operating System,…

2.) If I happen to exhaust all available sockets, how do I catch this?
- I created a standalone web application to try and catch this scenario. I set " --MaxSockets=1 " for the Debug Command Line arguments. Under Session I added all events with breakpoints. For app, I added all events with breakpoints. On Debug execution. I see the step through as expected. 1.) App.Open, 2.) App.HandleUrl, 3.) session.PrepareSession . Once the execution exits out of Session.PrepareSession, The browser shows ‘Launching…’. I was never able to catch an event regarding the exhaustion of available sockets. For the breakpoints, I dimensioned an integer and on the next line assigned a value. on the assigning of the value is where I set the breakpoint. Which allowed me to look through the stack.

This is not to say my test is valid in anyway.

Thank you to all who reads this, and especially to all who replies.

[quote=448780:@Jeffery Nuxoll]Greetings all,

I have tried to find the answer to my question, however I fear my Google 'Fu has failed me.
After reading WebApplication — Xojo documentation, (which is informational, however) I have a few questions that I was not able to find.

My questions pertains to WebApplications framework &:
1.) obtaining current Socket count
- is this built into the framework to obtain?
- Or should I be looking at the underlying Operating System,…

2.) If I happen to exhaust all available sockets, how do I catch this?
- I created a standalone web application to try and catch this scenario. I set " --MaxSockets=1 " for the Debug Command Line arguments. Under Session I added all events with breakpoints. For app, I added all events with breakpoints. On Debug execution. I see the step through as expected. 1.) App.Open, 2.) App.HandleUrl, 3.) session.PrepareSession . Once the execution exits out of Session.PrepareSession, The browser shows ‘Launching…’. I was never able to catch an event regarding the exhaustion of available sockets. For the breakpoints, I dimensioned an integer and on the next line assigned a value. on the assigning of the value is where I set the breakpoint. Which allowed me to look through the stack.

This is not to say my test is valid in anyway.

Thank you to all who reads this, and especially to all who replies.[/quote]
The web framework is designed to abstract you from that, so there’s no public way to get that info.

That said, it’s important to remember that sockets are not persistent because they’re connected, used, disconnected and destroyed, usually within a few milliseconds.

Is there a particular problem that you are trying to resolve?

It’s also worth noting that maxsockets <> max sessions. Typically, browsers will consume two to four simultaneous sockets per session depending on what’s going on.

Thank you for your time Greg. The problem is self induced. I’ll see about making a library. Thank you again!