Closed jamesnvc closed 4 years ago
This pull request has been mentioned on SWI-Prolog. There might be relevant details there:
https://swi-prolog.discourse.group/t/unix-sockets-with-swi/2123/4
Test usage now looks like:
?- unix_domain_socket(Sock),
tcp_connect(Sock, "/tmp/foo.sock"),
setup_call_cleanup(
tcp_open_socket(Sock, Stream),
format(Stream, "hello!~n", []),
close(Stream)
).
Thanks. Merged after squash. Added another patch to deal with the server side and which reorganizes things a bit to reuse more code.
Thanks Jan!
As mentioned on the Discourse.
This seems to be working for me now, although I'm not sure why the pldoc comments aren't showing up.
Tested by starting a socket with
nc -lU /tmp/foo.sock
in a terminal, then running