On Thursday, 25 June 2015 at 19:47:37 UTC, Ali Çehreli wrote:

I've found an old example of mine, which uses abstract sockets. Apparently, it was a concurrency experiment as well. Just translated from Turkish to English:

  http://ddili.org/ornek_kod/client_server.d

One difference I see is that mine doesn't set blocking. You can use it like this:

1) Start it as a server:

  ./deneme --role=server

2) Start as many clients as needed:

  ./deneme --role=client

Ali

P.S. And here is the original Turkish version:

  http://ddili.org/ornek_kod/istemci_sunucu.d

Thank you for the example code! I verified that client and server communicated, and that a standard file-based unix socket was not created. Then I simply changed the socketName to the socket I was interested in, and tried the client against it. Still no luck unfortunately, same error as earlier.

I have noticed that successful connect calls appear to show the size as 23, whereas unsuccessful connect calls show 24.

This works (socat):
connect(3, {sa_family=AF_FILE, path=@"/var/run/ptmd.socket"}, 23) = 0

This does not (from deneme, modified):
connect(3, {sa_family=AF_FILE, path=@"/var/run/ptmd.socket"}, 24) = -1 ECONNREFUSED (Connection refused)

Reply via email to