getqujing/qtunnel — pull request #9 by yunxing (2014-11-28 07:16:59+00:00)
Title: Connection: keep the connection alive after each packet transmission

If a tcp connection to be tunnelled is write-only, the second write will
timeout since the 'pipe' goroutine for write will terminate
after first write. Therefore there is no need to close the connection
after first packet transsmission.

This change also increase overall throughput since we don't need to
pay the overhead of connection establishment for every packets.