javascriptc#httpwebsocket

Need some hint on how to start porting my application


We have two applications, one called flexOS locally on "the server", and one called flexVisu remote on "the client". The first one is doing the job, collection data and such things.

Historically those two applications are able to communicate via TCP/IP sockets and a proprietary binary protocol.

Now we want to replace the client application flexVisu with a web page hosted on the IIS locally on the server. Every web browser on every device should be able to display these web page(s).

Firstly we experimented with an additional application (flexVisuWebServer) on the IIS side that basically hosted a web socket server and translated the json data from the client into binary data for the server and vice versa.

But this always requires a http connection and a wss connection to be open at the same time.

I don't know why, but I don't like the idea of using javascript on the client to handle all the data processing to display the server data.

I think that it would be much easier if I wrote an asp.Net c# application that handles the connection to "the server" via our proprietary TCP/IP protocol. That way no conversion of data between binary and json format must be done, and the web page itself can be also written in C#.

This approach much more resembles the current approach with flexVisu connecting directly to flexOS, the binary data is directly used to fill in Windows Forms controls.

What am I missing here?

Would the asp.Net application be able to connect to a tcp socket and use our own protocol?

[Edit: 2021-02-09 at 16:18 localtime]: I managed to use our proprietary TCP/IP protocol to connect from the web server to the flexOS in the page_load of the asp.net web page.

So basically it should not be a problem to use the underlying library to read data directly from the flexOS.

OT: Should i post subsequent ASP.Net questions here too, or open some more questions?


Solution

  • We decided to follow this concept: the webpage is using a websocket connection to our application flexVisuWebServer and this application uses our propietary TCP/IP protocoll to talk with flexOS.