[Twisted-Python] Re: Sockets: code works locally but fails over LAN
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On 31 Aug 2005 06:03:00 -0700, n00m <n00m@narod.ru> wrote:
This is about the same as: mktap portforward --port 1434 --host 192.168.0.3 --dest_port 1433 twistd -f portforward.tap You'll find the code behind these two commands here: <http://cvs.twistedmatrix.com/cvs/trunk/twisted/tap/portforward.py?view=markup&rev=13278> and here: <http://cvs.twistedmatrix.com/cvs/trunk/twisted/protocols/portforward.py?view=markup&rev=12914> And of course, the main Twisted site is <http://twistedmatrix.com/>. Some differences between portforward.tap and your code include: portforward.tap will accept multiple connections, rather than just one. portforward.tap won't print out all the bytes it receives (I assume this is just for debugging purposes anyway - if not, a simple modification will cause it to do this). portforward.tap won't non-deterministically drop traffic, since Twisted checks the return value of send() and properly re-transmits anything which has not actually been sent. Hope this helps, Jp
participants (1)
-
Jp Calderone