I want to put together simple TCP server using Python and Twisted.
The server starts up and waits for connection – I already have client – non-python application. Once connection is made server starts sending data at some interval (e.g. 1 sec).
The server reads data from a static file (a record at a time), I should be able to figure out this part.
I assume that I would use push producer to start pushing data once client is connected.
I have simple tcp server with factory in twisted and I can react to connectionMade/dataReceived and so on but I can’t figure out how to plug in the push producer.
Anyone knows any examples showing push producer with tcp server in twisted?
What about something simplistic like:
This has hard-coded data, but you say that reading it from a file instead is not your problem. If you can tell us what’s wrong with this overly simplistic “push server”, maybe we can offer better help!-)