Take the 2-minute tour ×  How can I create a non-http proxy with
Twisted. Instead I would like to do it for the Terraria protocol
which is made entirely of binary data. I see that they have a
built-in proxy for HTTP connections, but this application needs
to act more like an entry point which is forwarded to a set
server (almost like a BNC on IRC). I can't figure out how to
read the data off of one connection and send it to the other
connection.  I have already tried using a socket for this task,
but the blocking recv and send methods do not work well as two
connections need to be live at the same time.  share|improve
this question Are you trying to build a load balancer? –  tMC
Jun 7 '11 at 20:54 @tMC No. All the connections will go to one
server. Kind of like a BNC on IRC. You connect to the BNC while
it connects to the IRC server. If you lose your connection to
the BNC, you can just reconnect without losing your session. – 
AJ00200 Jun 7 '11 at 20:58 What protocol(s) are you hoping to
proxy? –  tMC Jun 7 '