diff options
author | Ian Gudger <igudger@google.com> | 2018-11-05 15:38:32 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-11-05 15:39:30 -0800 |
commit | 37cbce1f9156109a58ae3d350f8e0e9d027b3785 (patch) | |
tree | a76b631fd031c1f348562cc9b3a2275b43fb1556 /pkg/tcpip/transport/tcp/endpoint.go | |
parent | 704b56a40d0a041a4e6f814c3dbb1f9ec15f9002 (diff) |
Merge segments in sender's writeList
PiperOrigin-RevId: 220185891
Change-Id: Iaea73fd7b2fa8c399b989cdcaabf4885f370df4b
Diffstat (limited to 'pkg/tcpip/transport/tcp/endpoint.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/endpoint.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index 673a65c31..0b395b5b0 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -243,6 +243,16 @@ type endpoint struct { connectingAddress tcpip.Address } +// StopWork halts packet processing. Only to be used in tests. +func (e *endpoint) StopWork() { + e.workMu.Lock() +} + +// ResumeWork resumes packet processing. Only to be used in tests. +func (e *endpoint) ResumeWork() { + e.workMu.Unlock() +} + // keepalive is a synchronization wrapper used to appease stateify. See the // comment in endpoint, where it is used. // |