Re: [PATCH] chardev: use remoteAddr if the chardev is client

2025-02-25 Thread Haoqian He
> 2025年2月25日 21:29,Marc-André Lureau 写道: > > Hi Haoqian > > On Tue, Feb 25, 2025 at 5:19 PM Haoqian He wrote: >> >> I use chardev to connect with a vhost-user target, the chardev backend type >> is >> socket, part of QEMU boot parameter: >> -device vhost-user-blk-pci,chardev=my-vhost-blk-0

Re: [PATCH] chardev: use remoteAddr if the chardev is client

2025-02-25 Thread Marc-André Lureau
Hi On Tue, Feb 25, 2025 at 2:47 PM Haoqian He wrote: > > If the chardev is client, the socket file path in localAddr may be NULL. > This is because the socket path comes from getsockname(), according > to man page, getsockname() returns the current address bound by the > socket sockfd. If the cha