aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/net.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/net.go')
-rw-r--r--libgo/go/net/net.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/libgo/go/net/net.go b/libgo/go/net/net.go
index a3d1759..72b2b64 100644
--- a/libgo/go/net/net.go
+++ b/libgo/go/net/net.go
@@ -276,11 +276,23 @@ type Listener interface {
var errMissingAddress = errors.New("missing address")
+// OpError is the error type usually returned by functions in the net
+// package. It describes the operation, network type, and address of
+// an error.
type OpError struct {
- Op string
- Net string
+ // Op is the operation which caused the error, such as
+ // "read" or "write".
+ Op string
+
+ // Net is the network type on which this error occurred,
+ // such as "tcp" or "udp6".
+ Net string
+
+ // Addr is the network address on which this error occurred.
Addr Addr
- Err error
+
+ // Err is the error that occurred during the operation.
+ Err error
}
func (e *OpError) Error() string {