python - Twisted: tcp server with push producer example? -


I want to put ordinary TCP server together using Python and twisted.

The server starts and waits for the connection - I already have a client - a non-python application. After the connection becomes established the server starts sending data at some intervals (like 1 second) .

The server reads the data from a fixed file (one record at a time), I should be able to understand this part.

I think that after connecting the customer I will use the push maker to start pushing the data.

I have a simple TCP server with a manufactory and I can react to the connection / data received and therefore why plug in push producer .

Anyone know of any example that the push producer is twisted with the TCP server?

What about some simplified things:

 < Code> thedata = '' 'Questa Matina mill son Swangelieto o Bela Siao, Bela COO, Bela Ciao, COO, COO Quana Matina Mil's son Spaglieto ho troweto attacker! '' '.' STEPTILLIN (True) Push (protocol protocol): "" "This is the easiest protocol" "" About DIF connection "(self): For line in line: If there is no line or line. Spaces (): Continue self.transport.write (line) time.sleep (1.0) self.transport.loseConnection ()  

It has hard-coded data, but you say It's not your problem instead of reading it from a file if you can tell us what's wrong with this very simplified "push server", then maybe we can better assist! -)


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -