Skip to content

Conversation

@ng88
Copy link
Contributor

@ng88 ng88 commented Nov 17, 2024

This adds support for Unix domain sockets (both datagrams and streams). It is mostly a hack, and if there is interest in this feature, it might be worthwhile to refactor the main code a bit. For instance, by introducing base classes for datagrams (to be derived for UDP and Unix datagrams) and streams (to be derived for TCP and Unix streams). Ideally, the ip_version parameter should also be renamed to something more generic, like family.

That said, this branch works as intended and remains fully backward compatible with previous versions.

@tglane
Copy link
Owner

tglane commented Nov 18, 2024

Hey, I like the idea of adding unix domain socket support. But as you said, we should at least rename the ip_version type to something like family and than rename ip_version::v4 to family::ip_v4 and so on.

And than it might be enough to rename udp_socket class to datagram_socket and add using declarations for the ip versions and the unixsocket. That should not be to much work I think.

Would you be willing to add those changes or what do you think?

@ng88
Copy link
Contributor Author

ng88 commented Nov 18, 2024

Yes indeed but it will break backward compatibility, is that a problem for you?

@tglane
Copy link
Owner

tglane commented Nov 21, 2024

Not really. It's just a fun side project without any real world users. If I want to try out something new (like the coroutine stuff) I just play with it. So there is no real stable version or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants