Hi Laslo,

04.02.2019, 22:04, "Laslo Hunhold" <d...@frign.de>:
> It is very simple really. Let me give you an example with quark and
> nc(1) (You will need Netcat OpenBSD for the -U flag, which is available
> in all package sources I know).
>
> Let's first fire up quark:
>
>         # quark -U uds_main -d . -l
>
> This will create a UNIX-domain socket file "uds_main" in the current
> directory, but you can place it anywhere you like. Just for fun, I set
> the serving directory (-d) to the current directory and enabled
> directory listing (-l).
>
> The output of ls(1) shows the socket as
>
>         srw-rw-rw- 1 nobody nogroup 0 Feb 4 20:04 uds_main
>
> If you now want to send a request to the server using nc(1), simply
> send one to the socket like so:
>
>         echo -n -e "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" | \
>         nc -U udf_main
>
> and netcat will automatically print the response to stdout. That's
> it! :)

thanks for explanation! This seems to be very interesting approach.

Reply via email to