Can tcp and http connection listeners communicate with each other or not?

Is there a way that HTTP connections and tcp connection listeners can communicate with each other?

I have two separate application modules, one of which works via http, and the other - tcp. I need to do the interaction between these two modules, so that I can get my HTTP module to interact with the tcp-based module.

+3
source share
2 answers

Two different processes will not be able to use the same IP port on the same IP address. Thus, two processes will not be able to use the same inbound data stream exiting the TCP connection. If they use different ports, there is no problem.

If two processes use the same IP port, since HTTP is a protocol that sits on top of TCP, this means that your TCP process can be used as a channel through the HTTP process. A TCP process will connect to the IP port, perform its actions, and forward data to the HTTP process that will process it.

+2
source

, . HTTP - , , TCP - , . OSI.

, TCP - . . , , , , . HTTP .

, , , /, TCP , / HTTP.

+3

Source: https://habr.com/ru/post/1740114/


All Articles