| 1 | package packetio |
| 2 | |
| 3 | import ( |
| 4 | "errors" |
| 5 | ) |
| 6 | |
| 7 | // netError implements net.Error |
| 8 | type netError struct { |
| 9 | error |
| 10 | timeout, temporary bool |
| 11 | } |
| 12 | |
| 13 | func (e *netError) Timeout() bool { |
| 14 | return e.timeout |
| 15 | } |
| 16 | |
| 17 | func (e *netError) Temporary() bool { |
| 18 | return e.temporary |
| 19 | } |
| 20 | |
| 21 | var ( |
| 22 | // ErrFull is returned when the buffer has hit the configured limits. |
| 23 | ErrFull = errors.New("packetio.Buffer is full, discarding write") |
| 24 | |
| 25 | // ErrTimeout is returned when a deadline has expired |
| 26 | ErrTimeout = errors.New("i/o timeout") |
| 27 | ) |