MCPcopy
hub / github.com/MetaCubeX/mihomo / HalfClose

Function HalfClose

transport/snell/snell.go:146–154  ·  view source on GitHub ↗

HalfClose only works after the request negotiated the reuse command.

(conn net.Conn)

Source from the content-addressed store, hash-verified

144
145// HalfClose only works after the request negotiated the reuse command.
146func HalfClose(conn net.Conn) error {
147 if err := writeZeroChunk(conn); err != nil {
148 return err
149 }
150 if s, ok := conn.(*Snell); ok {
151 s.reply = false
152 }
153 return nil
154}
155
156func StreamConn(conn net.Conn, psk []byte, version int) *Snell {
157 if version >= Version4 {

Callers 1

PutMethod · 0.85

Calls 1

writeZeroChunkFunction · 0.85

Tested by

no test coverage detected