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

Struct halfConn

conn.go:189–204  ·  view source on GitHub ↗

A halfConn represents one direction of the record layer connection, either sending or receiving.

Source from the content-addressed store, hash-verified

187// A halfConn represents one direction of the record layer
188// connection, either sending or receiving.
189type halfConn struct {
190 sync.Mutex
191
192 err error // first permanent error
193 version uint16 // protocol version
194 cipher any // cipher algorithm
195 mac hash.Hash
196 seq [8]byte // 64-bit sequence number
197
198 scratchBuf [13]byte // to avoid allocs; interface method args escape
199
200 nextCipher any // next encryption state
201 nextMac hash.Hash // next MAC algorithm
202
203 trafficSecret []byte // current TLS 1.3 traffic secret
204}
205
206type permanentError struct {
207 err net.Error

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected