MCPcopy Create free account
hub / github.com/XTLS/Go / CloseWrite

Method CloseWrite

conn.go:1633–1639  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

1631// called once the handshake has completed and does not call CloseWrite on the
1632// underlying connection. Most callers should just use Close.
1633func (c *Conn) CloseWrite() error {
1634 if !c.handshakeComplete() {
1635 return errEarlyCloseWrite
1636 }
1637
1638 return c.closeNotify()
1639}
1640
1641func (c *Conn) closeNotify() error {
1642 c.out.Lock()

Callers

nothing calls this directly

Calls 2

handshakeCompleteMethod · 0.95
closeNotifyMethod · 0.95

Tested by

no test coverage detected