Any insight into the best way to get the protocol inside `try_send`, presently I'm using `getSockOpt` as follows:
opt_err = getsockopt(fd, SOL_SOCKET, SO_TYPE, &protocol, &opt_len); if (!opt_err && protocol == SOCK_DGRAM && is_port0(&unix_addr))
This causes other tests to completely freeze up.
SO_TYPE returns the socket type, not its protocol, and there are other DGRAM protocols than UDP (in particular raw and ICMP), which is precisely why I was advocating checking the protocol specifically. Unfortunately there's no portable way to retrieve the protocol with getsockopt(), but we could return it from the send_socket server request.