diff options
Diffstat (limited to 'vendor/github.com/pion/transport/packetio/errors.go')
-rw-r--r-- | vendor/github.com/pion/transport/packetio/errors.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/github.com/pion/transport/packetio/errors.go b/vendor/github.com/pion/transport/packetio/errors.go new file mode 100644 index 0000000..06f1b9d --- /dev/null +++ b/vendor/github.com/pion/transport/packetio/errors.go @@ -0,0 +1,27 @@ +package packetio + +import ( + "errors" +) + +// netError implements net.Error +type netError struct { + error + timeout, temporary bool +} + +func (e *netError) Timeout() bool { + return e.timeout +} + +func (e *netError) Temporary() bool { + return e.temporary +} + +var ( + // ErrFull is returned when the buffer has hit the configured limits. + ErrFull = errors.New("packetio.Buffer is full, discarding write") + + // ErrTimeout is returned when a deadline has expired + ErrTimeout = errors.New("i/o timeout") +) |