HalfClose only works after the request negotiated the reuse command.
(conn net.Conn)
| 144 | |
| 145 | // HalfClose only works after the request negotiated the reuse command. |
| 146 | func 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 | |
| 156 | func StreamConn(conn net.Conn, psk []byte, version int) *Snell { |
| 157 | if version >= Version4 { |