I know there are a lot of different comminucation protocals
like: http, tcp, ssh, socks5, SMTP, POP,
etc.
I also know that to achieve a comminication, we need to connect localhost:localport
to remotehost:remoteport
. For example, if we google something, we would connect a random local port
to www.google.com: 80
. If we ssh
a remote host, we would connect a random local port
to remotehost: 22
.
My question is: Are communication protocol Half-duplex or Full-duplex?
I guess the answer is Half-duplex
. Because I think in http
connection, at first we send the request from localhost:localport
to remotehost:80
, and then the remote server send its response from remotehost:80
to localhost:localport
. Similarly, in ssh
connection, at first we sent the ssh
commands to remote host, after receiving the commands, the remote host do something and send the results back to the local host.
So I think in one connection between localhost:localport
and remotehost:remoteport
, the message is sent either from localhost:localport
to remotehost:remoteport
, or from remotehost:remoteport
to localhost:localport
.
Am I right?
question from:
https://stackoverflow.com/questions/65545577/are-communication-protocol-half-duplex-or-full-duplex 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…