Can the swoole TCP server get the domain name requested by the client?

can the swoole TCP server get the domain name requested by the client?

for example, if I request the domain name www.lot.com locally, how can I get this domain name from swoole"s tcp server

Jun.29,2022

Pure TCP communication cannot be done, but can only rely on upper layer protocols, such as HTTP, or custom protocols.

because only the IP and port of the other party are needed for TCP communication, for the client, the IP of the server is parsed from the domain name www.lot.com .

Menu