MCPcopy
hub / github.com/segmentio/kafka-go / Close

Method Close

conn_test.go:34–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func (c *connPipe) Close() error {
35 b := [1]byte{} // marker that the connection has been closed
36 c.wconn.SetWriteDeadline(time.Time{})
37 c.wconn.Write(b[:])
38 c.wconn.Close()
39 c.rconn.Close()
40 return nil
41}
42
43func (c *connPipe) Read(b []byte) (int, error) {
44 // See comments in Write.

Callers 11

ReadMethod · 0.45
TestConnFunction · 0.45
testConnCloseFunction · 0.45
testConnCloseAndWriteFunction · 0.45
BenchmarkConnFunction · 0.45
benchmarkConnReadBatchFunction · 0.45

Calls 2

SetWriteDeadlineMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected