From 83b1a30f292fc6c00f29e614c2be6fcb1a6340db Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Fri, 14 Jul 2023 14:39:51 +0800 Subject: [PATCH] docs: fix the description of host/guest in vsock In Connecting from Host to Guest section, the host/guest are misused, this patch fix that. Signed-off-by: Yi Wang --- docs/vsock.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/vsock.md b/docs/vsock.md index ba8e0d68e..3bcc49f85 100644 --- a/docs/vsock.md +++ b/docs/vsock.md @@ -50,14 +50,14 @@ The examples use __socat__ `>=1.7.4` to illustrate the VSOCK functionality. Howe ### Connecting from Host to Guest -The host starts to listen on the defined port: +The guest starts to listen on the defined port: `$ socat - VSOCK-LISTEN:1234` -Once the host is listening, the guest can send data: +Once the guest is listening, the host can send data: `echo -e "CONNECT 1234\\nHello from host!" | socat - UNIX-CONNECT:/tmp/ch.vsock - + Note the string `CONNECT ` prepended to the actual data. It is possible for the guest to start listening on different ports, thus the specific command is needed to instruct VSOCK to which listener the host wants to connect. It needs to be sent once per connection. Once the connection established, data transfers can take place directly. ### Connecting from Guest to Host