diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/tcpip/sample/tun_tcp_connect/main.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/tcpip/sample/tun_tcp_connect/main.go b/pkg/tcpip/sample/tun_tcp_connect/main.go index dd5bd9b3f..138941afd 100644 --- a/pkg/tcpip/sample/tun_tcp_connect/main.go +++ b/pkg/tcpip/sample/tun_tcp_connect/main.go @@ -330,6 +330,9 @@ func main() { fmt.Println("Connected") + payload := tcpip.SlicePayload([]byte("GET / HTTP/1.0\r\nHost: www.m7n.se\r\n\r\n")) + ep.Write(payload, tcpip.WriteOptions{}) + // Start the writer in its own goroutine. writerCompletedCh := make(chan struct{}) go writer(writerCompletedCh, ep) // S/R-SAFE: sample code. |