CloseWrite shuts down the writing side of the connection. It should only be called once the handshake has completed and does not call CloseWrite on the underlying connection. Most callers should just use Close.
()
| 1631 | // called once the handshake has completed and does not call CloseWrite on the |
| 1632 | // underlying connection. Most callers should just use Close. |
| 1633 | func (c *Conn) CloseWrite() error { |
| 1634 | if !c.handshakeComplete() { |
| 1635 | return errEarlyCloseWrite |
| 1636 | } |
| 1637 | |
| 1638 | return c.closeNotify() |
| 1639 | } |
| 1640 | |
| 1641 | func (c *Conn) closeNotify() error { |
| 1642 | c.out.Lock() |
nothing calls this directly
no test coverage detected