Any NetCat gurus here? Question about the -q flag in HA

Okay, hopefully this is an easy question:

I’m sending a netcat command from Home Assistant to my blu ray player and it’s working well. However, I want netcat to close the connection to the player immediately after the command is sent. I’m planning to do this with the -q flag.

Evidently some versions of netcat can use “-q 0” for “close the connection 0 seconds after the data is sent” and some need a number of at least 1. Does anyone know if the version of netcat in Home Assistant will support -q 0?

Okay, I realized I can just install SSH Terminal to try out flags and see if they work. It seems the HA version of Netcat doesn’t actually have the -q flag. However, the -w flag does let me close a connection after N seconds. And I’m not getting an error if I use -w0, so I think the connection is closed immediately. It’s a start!

I am using dockerized Home Assistant (so my tests may be different to HAOS).

The docker version appears to be the BusyBox version of netcat.
It appears that, that version closes the connection as soon as STDIN is exhausted (so no flags are needed).