2

I am developing a network application using circuits-framework and Python 2.7. I make my own TCP server based on TCPServer class. And I'd like to know how to store some persistent info such as user login data when using TCP socket connection?

class MyTCPServer(TCPServer):

@handler("read")
def on_read(self, sock, data):
    """Read Event Handler"""
    return data+" from server at :"+time.strftime("%c")

Thanks!

ZHAO Peng
  • 31
  • 4
  • You should persist this data in an object associated with the component or detached storage like a database. Have a look at circuits/web/sessions.py for example – James Mills May 09 '16 at 16:11

0 Answers0