MCPcopy
hub / github.com/IBM/sarama / readFull

Method readFull

broker.go:1050–1056  ·  view source on GitHub ↗

readFull ensures the conn ReadDeadline has been setup before making a call to io.ReadFull

(buf []byte)

Source from the content-addressed store, hash-verified

1048// readFull ensures the conn ReadDeadline has been setup before making a
1049// call to io.ReadFull
1050func (b *Broker) readFull(buf []byte) (n int, err error) {
1051 if err := b.conn.SetReadDeadline(time.Now().Add(b.conf.Net.ReadTimeout)); err != nil {
1052 return 0, err
1053 }
1054
1055 return io.ReadFull(b.conn, buf)
1056}
1057
1058// write ensures the conn Deadline has been setup before making a
1059// call to conn.Write

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected