Hello,

I'm trying to write an application that will basically serve as a tunnel 
between some servers outside our network and our internal servers. For this 
I've started using a snippet that creates a tcp listener and then dials to 
a remote host. Code is shown here:

https://play.golang.org/p/4wjCZFXq6Yg

The code works just fine, however every time it gets a new request it dials 
a new connection to the remote host, and then after all data has been 
forwarded to both sides it closes them. I'm no expert on networking but 
this looks like its just opening/closing tcp connections instead of just 
reusing them, is this correct? if so, what would be the correct way of 
resuing the connection? 

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3497df63-df20-4e07-a2b8-db1a49159c2d%40googlegroups.com.

Reply via email to