TCPSocket on Web App

I wrote a simple desktop app that opens a TCPSocket to a fixed address and port to communicate with a piece of hardware on the local network.
Works fine back and forth with the desktop app.

Converted it to a web app, and while the Connect function seems to work, TCPSocket.DataAvailable never seems to fire. That is to say, I don’t receive any data from my device. Sending to the TCPSocket and Closing the TCPSocket doesn’t seem to work either.
I’ve checked and re-checked and I think I have the code the same for the 2 applications, except the desktop app works and the web doesn’t.

Is there something special I need to do on the Web app to allow it to communicate to a device on the local network?

I’m running the program in the IDE and it opens a browser window with address

Could it be a mask or ip issue?
The device is at ip port 51325.

when you run the address in the browser is where the browser is going to look for your web app which, for debuggin, is running its own web server on that address

it has nothing to do with where your web app is going to look for the device

Ok, so any suggestions on what I might need to change in the Web App to make TCPSocket work the same as it does in an app?

The code is literally the same on both apps, I’ve just recreated the window and controls in the Web App.

Looks like it’s an issue with the data not being displayed in the web app. It’s not an issue with the TCPSocket after all.
Web apps look to be fussy about particular characters.

Sorry! First Web App and learning as I go along here…