(b []byte)
| 41 | } |
| 42 | |
| 43 | func (c *connPipe) Read(b []byte) (int, error) { |
| 44 | // See comments in Write. |
| 45 | time.Sleep(time.Millisecond) |
| 46 | if t := c.rconn.readDeadline(); !t.IsZero() { |
| 47 | return 0, &timeout{} |
| 48 | } |
| 49 | n, err := c.rconn.Read(b) |
| 50 | if n == 1 && b[0] == 0 { |
| 51 | c.rconn.Close() |
| 52 | n, err = 0, io.EOF |
| 53 | } |
| 54 | return n, err |
| 55 | } |
| 56 | |
| 57 | func (c *connPipe) Write(b []byte) (int, error) { |
| 58 | // The nettest/ConcurrentMethods test spawns a bunch of goroutines that do |
no test coverage detected