Is there a python library which implements a standalone TCP stack?
I can't use the usual python socket library because I'm receiving a stream of packets over a socket (they are being tunneled to me over this socket).  When I receive a TCP SYN packet addressed to a particular port, I'd like to accept the connection (send a syn-ack) and then get the data sent by the other end (ack'ing appropriately).
I was hoping there was some sort of TCP stack already written which I could utilize.  Any ideas?  I've used lwip in the past for a C project -- something along those lines in python would be perfect.
I know this isn't directly Python related but if you are looking to do heavy network processing, you should consider Erlang instead of Python.  Just a suggestion really... you can always take a shot a doing this with Twisted... if you feel adventurous (and have lots of time on your side) ;-)
Python TCP stack implementation