transport messages between tcp server and http server

luiqwer
Posts: 7
Joined: Fri Sep 16, 2022 1:44 am

transport messages between tcp server and http server

Postby luiqwer » Mon May 29, 2023 4:00 pm

Hello everyone.
I have set up an http server at 192.168.4.1:80 and a tcp server at 192.168.4.1 listening on port 5000, how should I transfer the data from the tcp server to the web using the http server? Any suggestions?
There are about 2 ideas now, the first is to set up a tcp client on the http server to forward the data from the tcp server to the http server, the second is to do port data forwarding at the ip layer and forward the data on port 5000 directly to port 80, am I understanding this correctly? Is there a better way to do this?
Thanks.

MicroController
Posts: 1742
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: transport messages between tcp server and http server

Postby MicroController » Mon May 29, 2023 7:08 pm

forward the data on port 5000 directly to port 80
What are you trying to do? I think you may not be aware of the differences between HTTP and TCP.

luiqwer
Posts: 7
Joined: Fri Sep 16, 2022 1:44 am

Re: transport messages between tcp server and http server

Postby luiqwer » Tue May 30, 2023 1:13 am

MicroController wrote:
Mon May 29, 2023 7:08 pm
forward the data on port 5000 directly to port 80
What are you trying to do? I think you may not be aware of the differences between HTTP and TCP.
The ultimate goal is to use the same ip, port 80 for the webserver and port 5000 for the tcp server listening port. I need to display the incoming and outgoing data on port 5000 on the webserver.

MicroController
Posts: 1742
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: transport messages between tcp server and http server

Postby MicroController » Tue May 30, 2023 7:43 am

Ok, but
I need to display the incoming and outgoing data on port 5000 on the webserver.
doesn't make sense.
What do you mean by "display" the data "on the webserver"?

Who is online

Users browsing this forum: No registered users and 90 guests