()
| 155 | } |
| 156 | |
| 157 | func (tun *netTun) WriteNotify() { |
| 158 | pkt := tun.ep.Read() |
| 159 | if pkt == nil { |
| 160 | return |
| 161 | } |
| 162 | |
| 163 | view := pkt.ToView() |
| 164 | pkt.DecRef() |
| 165 | |
| 166 | tun.incomingPacket <- view |
| 167 | } |
| 168 | |
| 169 | func (tun *netTun) Close() error { |
| 170 | tun.stack.RemoveNIC(1) |