transport: consolidated IP{v4,v6}/unix transports to {stream,dgram}-transpor
The recognized address prefixes are now tcp4, tcp6, udp4, udp6, unxstrm,
and unxdgrm. If you omit the type-specifier prefix, the address resolver
code will try to figure out the type based on the address itself ('[',
']', '@', '/'). However, a prefix specifies both the address family and
the connection-oriented vs. connectionlessness of the transport. The
resolver cannot guess which one you want if you omit the prefix and you
will always end up with connection-oriented transports in this case (as
these are registered before the datagram ones).
If you are careless and try to use prefixless string addresses for datagram
transports, you will get quite difficult to understand errors (as you end
up polling an unconnected, unlistened socket for readability).
One way to get around this would be to change the API so that
- only the address family is passed to the address resolver
- the socket type (dgram/stream) is passed to the transport creation
Although, this would be a more natural abstraction... maybe another day.
14 files changed: