| 79 | } |
| 80 | |
| 81 | template<typename Stream> inline |
| 82 | Stream* new_stream(int family, int protocol = 0, bool nonblocking = true) { |
| 83 | int fd = socket(family, protocol, nonblocking, family != AF_UNIX); |
| 84 | return (fd < 0) ? nullptr : new Stream(fd); |
| 85 | } |
| 86 | |
| 87 | class KernelSocketStream : public SocketStreamBase { |
| 88 | public: |