| 107 | } |
| 108 | |
| 109 | bool socket_stream::bind_multicast(const char *addr, const char *iface, |
| 110 | int port, int rw_timeout, unsigned int flags) { |
| 111 | if (stream_) { |
| 112 | acl_vstream_close(stream_); |
| 113 | } |
| 114 | |
| 115 | unsigned oflags = to_oflags(flags); |
| 116 | stream_ = acl_vstream_bind_multicast(addr, iface, port, |
| 117 | rw_timeout, oflags); |
| 118 | if (stream_ == NULL) { |
| 119 | return false; |
| 120 | } |
| 121 | eof_ = false; |
| 122 | opened_ = true; |
| 123 | return true; |
| 124 | } |
| 125 | |
| 126 | bool socket_stream::multicast_set_ttl(int ttl) const { |
| 127 | if (eof_ || stream_ == NULL) { |
no test coverage detected