Lewin Bormann
Lewin Bormann
I'm afraid I don't quite understand the point you are trying to make. Are you suggesting that the `unix_dgram_client::unix_dgram_client()` constructor should `unlink()` the socket path after connecting?
Ah I now understand where the socket is unlinked You mean that in this example "/tmp/clsock" may have already been created by the server? Yes, but if the client wants...
> main() { > libsocket::unix_dgram_client cl("/tmp/clsock"); > cl.sndto(msg, msg_len, "/tmp/clsock"); > ... > } But shouldn't you send it to the server? i.e. `/tmp/srvsock`? http://dermesser.github.io/libsocket/doc/doxygen/html/classlibsocket_1_1unix__dgram.html#a84c3e94edd3a3db9a156b59e38cb4643 The client only unlinks `/tmp/clsock`...
Yes, that is intended behavior, because the path in the client constructor is the path the client socket should bind to. Obviously it should bind to its own path, not...
Thanks for finding this bug! Can you send me a pull request in order to patch this? (should be easy given that you already have the patched file)
I'm afraid I do not understand your issue.
Yeah, a good rule of thumb is to place linker arguments at the end of the command line. Can I close this?
Sorry, I misunderstood your problem. Do you want to create a pull request? And you're probably right in that it's a Ubuntu problem because I don't experience this on Debian.
@ancloud-teach does this work well for you? If so, would you mind documenting it somewhere? Either as comments in the CMakeLists.txt or on a doxygen page, for example.
It's hardly possible for both the C and the C++ part because TCP client sockets are created and immediately connected after that in create_inet_stream_socket in [C/inet/libinetsocket.c](https://github.com/dermesser/libsocket/blob/master/C/inet/libinetsocket.c#L140) (actual socket()/connect() in lines...