diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2019-06-06 08:05:46 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-06-06 08:07:02 -0700 |
commit | 85be01b42d4ac48698d1e8f50a4cf2607a4fc50b (patch) | |
tree | 18d58e55f9c21a177ed149d460f751649df7f0e5 /pkg/tcpip/sample/tun_tcp_connect | |
parent | 79f7cb6c1c4c16e3aca44d7fdc8e9f2487a605cf (diff) |
Add multi-fd support to fdbased endpoint.
This allows an fdbased endpoint to have multiple underlying fd's from which
packets can be read and dispatched/written to.
This should allow for higher throughput as well as better scalability of the
network stack as number of connections increases.
Updates #231
PiperOrigin-RevId: 251852825
Diffstat (limited to 'pkg/tcpip/sample/tun_tcp_connect')
-rw-r--r-- | pkg/tcpip/sample/tun_tcp_connect/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/sample/tun_tcp_connect/main.go b/pkg/tcpip/sample/tun_tcp_connect/main.go index 1681de56e..1fa899e7e 100644 --- a/pkg/tcpip/sample/tun_tcp_connect/main.go +++ b/pkg/tcpip/sample/tun_tcp_connect/main.go @@ -137,7 +137,7 @@ func main() { log.Fatal(err) } - linkID, err := fdbased.New(&fdbased.Options{FD: fd, MTU: mtu}) + linkID, err := fdbased.New(&fdbased.Options{FDs: []int{fd}, MTU: mtu}) if err != nil { log.Fatal(err) } |