HTTPSocket.listen / HTTPSocket.poll

  1. 2 months ago

    David Y

    Jun 12 Pre-Release Testers, Xojo Pro Doncaster, UK

    Hi, I have a (very small) console app running on a server that listens on a specific port for incoming connections. A third party then sends a connection and post data for the app to respond to and update some fields in a cubeSQL server table. Very simple.

    The Connected event fires, as does, PageReceieved where I do all my processing. All works great, most of the time, but periodically, the port its listening on closes (I test this using Network Utility on a Mac) - the console app continues to run though. I'm echoing the error event and not seeing anything there to suggest something has gone awry. To keep the console app alive, I'm using

    mMyApplication = new MyApplication
    mMyApplication.Initialize(args)
    do
    DoEvents()
    loop until mMyApplication.Idle
    return mMyApplication.Finalize

    ... in the app.run event.

    (mMyApplication being a class in the project that does very little apart from initialise things and make a connection to the cubeSQL server).

    Do I need to utilise HTTPSocket.poll when using myHTTPSocket.Listen() ? I've only used HTTPSocket.poll when reading console output.

    Any help greatly appreciated.

    Thanks,
    Dave.

    Sorry, my bad, should have been using ServerSocket - duh.

  2. David Y

    Jun 12 Pre-Release Testers, Xojo Pro Answer Doncaster, UK

    Sorry, my bad, should have been using ServerSocket - duh.

or Sign Up to reply!