Page 1 of 1

transport messages between tcp server and http server

Posted: Mon May 29, 2023 4:00 pm
by luiqwer
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.

Re: transport messages between tcp server and http server

Posted: Mon May 29, 2023 7:08 pm
by MicroController
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.

Re: transport messages between tcp server and http server

Posted: Tue May 30, 2023 1:13 am
by luiqwer
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.

Re: transport messages between tcp server and http server

Posted: Tue May 30, 2023 7:43 am
by MicroController
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"?