Attention is currently required from: Gregory Detal.
Matthieu Baerts would like Gregory Detal to review this change.
net: poll: add GetsockoptInt
This new function wraps the getsockopt() network call with an integer
argument, similar to SetsockoptInt().
This will be used in MPTCP in the following commit.
Updates #56539
https://github.com/golang/go/issues/56539
Signed-off-by: Gregory Detal <gregor...@tessares.net>
Signed-off-by: Matthieu Baerts <matthie...@tessares.net>
Change-Id: I8f6aa00ea2535683d9bbf436993c23e9c6ca2af3
---
M src/internal/poll/sockopt.go
1 file changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/internal/poll/sockopt.go b/src/internal/poll/sockopt.go
index a7c9d11..a87a9e6 100644
--- a/src/internal/poll/sockopt.go
+++ b/src/internal/poll/sockopt.go
@@ -34,3 +34,12 @@
defer fd.decref()
return syscall.SetsockoptLinger(fd.Sysfd, level, name, l)
}
+
+// GetsockoptInt wraps the getsockopt network call with an int argument.
+func (fd *FD) GetsockoptInt(level, name int) (int, error) {
+ if err := fd.incref(); err != nil {
+ return -1, err
+ }
+ defer fd.decref()
+ return syscall.GetsockoptInt(fd.Sysfd, level, name)
+}
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Gregory Detal.
Matthieu Baerts uploaded patch set #3 to this change.
net: poll: add GetsockoptInt
This new function wraps the getsockopt network call with an integer
argument, similar to SetsockoptInt.
This will be used in MPTCP in the following commit.
This work has been co-developped by Gregory Detal
<gregor...@tessares.net>.
Updates #56539
Change-Id: I8f6aa00ea2535683d9bbf436993c23e9c6ca2af3
---
M src/internal/poll/sockopt.go
1 file changed, 9 insertions(+), 0 deletions(-)
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Gregory Detal, Matthieu Baerts.
1 comment:
Commit Message:
Patch Set #3, Line 7: net: poll: add GetsockoptInt
internal/poll: add GetsockoptInt
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Gregory Detal, Ian Lance Taylor.
1 comment:
Commit Message:
Patch Set #3, Line 7: net: poll: add GetsockoptInt
internal/poll: add GetsockoptInt
Done
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Gregory Detal, Ian Lance Taylor.
Matthieu Baerts uploaded patch set #4 to this change.
internal/poll: add GetsockoptInt
This new function wraps the getsockopt network call with an integer
argument, similar to SetsockoptInt.
This will be used in MPTCP in the following commit.
This work has been co-developped by Gregory Detal
<gregor...@tessares.net>.
Updates #59166
Change-Id: I8f6aa00ea2535683d9bbf436993c23e9c6ca2af3
---
M src/internal/poll/sockopt.go
1 file changed, 9 insertions(+), 0 deletions(-)
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Gregory Detal, Ian Lance Taylor, Matthieu Baerts.
Patch set 11:Run-TryBot +1
Attention is currently required from: Gregory Detal, Ian Lance Taylor, Matthieu Baerts.
Patch set 12:Run-TryBot +1
1 comment:
Commit Message:
s/developped/developed/
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Gregory Detal, Ian Lance Taylor, Matthieu Baerts.
Matthieu Baerts uploaded patch set #13 to this change.
internal/poll: add GetsockoptInt
This new function wraps the getsockopt network call with an integer
argument, similar to SetsockoptInt.
This will be used in MPTCP in the following commit.
This work has been co-developed by Gregory Detal
<gregor...@tessares.net>.
Updates #59166
Change-Id: I8f6aa00ea2535683d9bbf436993c23e9c6ca2af3
---
M src/internal/poll/sockopt.go
1 file changed, 9 insertions(+), 0 deletions(-)
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Emmanuel Odeke, Gregory Detal, Ian Lance Taylor.
1 comment:
Commit Message:
s/developped/developed/
Done
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Gregory Detal, Ian Lance Taylor, Matthieu Baerts.
Patch set 13:Run-TryBot +1Code-Review +1
Attention is currently required from: Gregory Detal, Ian Lance Taylor, Matthieu Baerts.
Patch set 15:Run-TryBot +1Code-Review +1
Attention is currently required from: Emmanuel Odeke, Gregory Detal, Ian Lance Taylor, Matthieu Baerts.
Patch set 17:Run-TryBot +1Auto-Submit +1Code-Review +2
1 comment:
Patchset:
Thanks.
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Emmanuel Odeke, Gregory Detal, Ian Lance Taylor, Matthieu Baerts.
Patch set 19:Run-TryBot +1Auto-Submit +1Code-Review +2
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Emmanuel Odeke, Gregory Detal, Ian Lance Taylor, Matthieu Baerts.
Patch set 19:Code-Review +1
Gopher Robot submitted this change.
internal/poll: add GetsockoptInt
This new function wraps the getsockopt network call with an integer
argument, similar to SetsockoptInt.
This will be used in MPTCP in the following commit.
This work has been co-developed by Gregory Detal
<gregor...@tessares.net>.
Updates #59166
Change-Id: I8f6aa00ea2535683d9bbf436993c23e9c6ca2af3
Reviewed-on: https://go-review.googlesource.com/c/go/+/471139
Reviewed-by: Bryan Mills <bcm...@google.com>
Auto-Submit: Ian Lance Taylor <ia...@google.com>
Reviewed-by: Emmanuel Odeke <emma...@orijtech.com>
Reviewed-by: Ian Lance Taylor <ia...@google.com>
Run-TryBot: Ian Lance Taylor <ia...@google.com>
TryBot-Result: Gopher Robot <go...@golang.org>
---
M src/internal/poll/sockopt.go
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/internal/poll/sockopt.go b/src/internal/poll/sockopt.go
index a7c9d11..a87a9e6 100644
--- a/src/internal/poll/sockopt.go
+++ b/src/internal/poll/sockopt.go
@@ -34,3 +34,12 @@
defer fd.decref()
return syscall.SetsockoptLinger(fd.Sysfd, level, name, l)
}
+
+// GetsockoptInt wraps the getsockopt network call with an int argument.
+func (fd *FD) GetsockoptInt(level, name int) (int, error) {
+ if err := fd.incref(); err != nil {
+ return -1, err
+ }
+ defer fd.decref()
+ return syscall.GetsockoptInt(fd.Sysfd, level, name)
+}
To view, visit change 471139. To unsubscribe, or for help writing mail filters, visit settings.