TCPSocket not in library for web apps

In converting a desktop app to a web app, I found that TCP and UDPSockets are not available in the library. Is this intentional or a bug?

It makes no sense for those controls to live on a WebPage, and there is no visual representation of a WebSession. You’ll have to add these things as a property somewhere and instantiate with new. I’d generally suggest making dynamic sockets app properties, but it really depends on your particular app.

To me, it makes more sense to have a TCPSocket on a web page than a thread. Even on a desktop page, the thread can’t update the page. I understand that in the past threads could update the user interface directly and threads are still on the window for consistency. If Xojo wants to say you can use the same code in a web app that was used in a desktop one, TCPSockets should go on the page also. The web page I am working on right now has buttons that cause data to be retrieved through a TCPSocket and update labels and text fields on the page.

Eh, no. Controls on web page are client side abstractions with server side support. You probably want the TCPSocket to connect to a remote socket from the server.

That’s exactly what I want, but I don’t want to have to specify the page in the DataAvailable event where the answer should appear. I don’t have to do that in a desktop app.

I love to have sockets on a webpage, window or container. Just to have the events where I need and without an extra class where I have to think how to call methods from parent object.

On Desktop, having a socket on a window or container is fine. On Web, it would work OK until you start closing pages. But they should ideally be owned by the Session or the app so they can function across page navigation by the user.

and made a case: 34395