Close closes the connection and sends a value on the close channel.
()
| 31 | |
| 32 | // Close closes the connection and sends a value on the close channel. |
| 33 | func (cw *ConnWrapper) Close() error { |
| 34 | err := cw.Conn.Close() |
| 35 | cw.CloseCh.Replace(nil) |
| 36 | return err |
| 37 | } |
| 38 | |
| 39 | // ListenerWrapper wraps a net.Listener and the returned net.Conn. |
| 40 | // |