Questions regarding WebApplication & Sockets

  1. 7 weeks ago

    Jeffery N

    Aug 3 Pre-Release Testers, Xojo Pro

    Greetings all,

    I have tried to find the answer to my question, however I fear my Google 'Fu has failed me.
    After reading https://docs.xojo.com/WebApplication , (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.

    @Jeffery N Greetings all,

    I have tried to find the answer to my question, however I fear my Google 'Fu has failed me.
    After reading https://docs.xojo.com/WebApplication , (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.

    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?

  2. Greg O

    Aug 4 Xojo Inc Answer

    @Jeffery N Greetings all,

    I have tried to find the answer to my question, however I fear my Google 'Fu has failed me.
    After reading https://docs.xojo.com/WebApplication , (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.

    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?

  3. Greg O

    Aug 4 Xojo Inc
    Edited 7 weeks ago

    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.

  4. Jeffery N

    Aug 4 Pre-Release Testers, Xojo Pro

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

or Sign Up to reply!