mini-TCP stack in Python, for fun