From 204d7b2d82e9cf67a4af7d2c90134fc8ff26dcb6 Mon Sep 17 00:00:00 2001 From: Ryo Ota Date: Sun, 18 Oct 2020 18:34:37 +0900 Subject: [PATCH 1/3] bump: 0.2.2-SNAPSHOT --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index fafddf1..f23fa2b 100644 --- a/version/version.go +++ b/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "0.2.1" +const Version = "0.2.2-SNAPSHOT" From 9327cd84d27ab55160b0826a89cc8dad5bd67624 Mon Sep 17 00:00:00 2001 From: Ryo Ota Date: Thu, 29 Oct 2020 21:34:03 +0900 Subject: [PATCH 2/3] feat: create --s-to-c-buf-size flag --- cmd/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/client.go b/cmd/client.go index 6c7b773..a3f9d11 100644 --- a/cmd/client.go +++ b/cmd/client.go @@ -15,10 +15,12 @@ import ( ) var clientHostPort int +var clientServerToClientBuffSize uint func init() { RootCmd.AddCommand(clientCmd) clientCmd.Flags().IntVarP(&clientHostPort, "port", "p", 0, "TCP port of client host") + clientCmd.Flags().UintVarP(&clientServerToClientBuffSize, "s-to-c-buf-size", "", 16, "Buffer size of server-to-client") } var clientCmd = &cobra.Command{ @@ -115,7 +117,8 @@ var clientCmd = &cobra.Command{ if progress != nil { writer = io.MultiWriter(conn, progress) } - _, err = io.Copy(writer, res.Body) + var buf = make([]byte, clientServerToClientBuffSize) + _, err = io.CopyBuffer(writer, res.Body, buf) fmt.Println() if err != nil { return err From 69ec120922b2ab3e7522c781c814869c7eb63079 Mon Sep 17 00:00:00 2001 From: Ryo Ota Date: Thu, 29 Oct 2020 21:38:49 +0900 Subject: [PATCH 3/3] bump: 0.2.2 --- CHANGELOG.md | 7 ++++++- version/version.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index adcef7e..519ca45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) ## [Unreleased] +## [0.2.2] - 2020-10-29 +### Added +* Add --s-to-c-buf-size flag to client + ## [0.2.1] - 2020-10-18 ### Added * Add --header flag to specify HTTP header @@ -22,6 +26,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) ### Added * Initial release -[Unreleased]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.2.1...HEAD +[Unreleased]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.2.2...HEAD +[0.2.2]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.2.1...v0.2.2 [0.2.1]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.1.0...v0.2.0 diff --git a/version/version.go b/version/version.go index f23fa2b..42af8ff 100644 --- a/version/version.go +++ b/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "0.2.2-SNAPSHOT" +const Version = "0.2.2"