Closed javaarchive closed 5 months ago
You have a RemoteAddr
for those cases; could that be useful? Currently, it supports 2 variants but new ones can be added
EDIT. Never mind, you refer to to the one in ConnectionInfo
, right?
Basically here the implementation of fn listen_with(config: TransportListen, addr: SocketAddr)
takes in SocketAddr which only seems to have IPv4 and IPv6 variants and unix sockets may want to be binded to a file path but for now I am ignoring this parameter initially.
As for fixing the ConnectionInfo
that is another issue that I am looking into.
I'm going to close this since it seems like on my experiment with a enum that goes between the address types, the SocketAddr for unix sockets is really bad as it doesn't implement any basic traits like Eq
or Clone
which are needed here even though their underlying types are trivial to derive it for. Likely just going to keep a personal branch of this project that uses a fork of mio for the ugly solution if I need it.
A bit new to rust, is there any consideration to how transports can be implemented to take in something that is not of
SocketAddr
type? I am attempting to implement a unix socket adapter and it takes in a path instead of SocketAddr so my current method will likely ignore the SocketAddr but it will still have to be passed.