diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-01-23 02:19:51 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-01-23 21:43:01 +0100 |
commit | 4a6f9df985898fec65fd86c22171f73522e6711b (patch) | |
tree | b6b00787cb59ba36d2872b539bc225ff535836e0 /pkg | |
parent | 4e0e658f9bab3348925398a411c0670cfc84714c (diff) |
sent http request
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. |