Questions tagged [twisted]

Twisted is an event-driven networking engine, written in Python and implementing many different protocols.

Twisted is a multi-protocol, event-driven, liberally-licensed open-source networking engine written in Python. It is useful for implementing both clients and servers, and scales up to large websites and down to embedded devices. Twisted makes it easy to implement custom network applications.

3465 questions
1
vote
1 answer

Twisted client connection lost

I have a very simple client program: class EchoClient(Int32StringReceiver): def connectionMade(self): print 'connection made.' str = "" self.sendString(str) print…
egbokul
  • 3,944
  • 7
  • 36
  • 54
1
vote
1 answer

Comet connection timing out

I have a simple comet server in written in Twisted. It prints out time stamps. I also have a small static webserver running on the same port. The javascript on the page served tries to update the page by appending the timestamps from the comet…
James
  • 2,626
  • 5
  • 37
  • 51
1
vote
1 answer

Compound custom service server using Twisted

I have an interesting project going on at our workplace. The task, that stands before us, is such: Build a custom server using Python It has a web server part, serving REST It has a FTP server part, serving files It has a SMTP part, which receives…
Tomáš Plešek
  • 1,482
  • 2
  • 12
  • 21
1
vote
1 answer

How to shutdown and start a server in Python Twisted?

My client (based on twisted) is supposed to automatically reconnect to server when connection is lost, i need to make a test of this feature, here's my test method where the @todo comment is very clear about what behaviour is…
zfou
  • 891
  • 1
  • 10
  • 33
1
vote
1 answer

Twisted Longpoll Server: request loop persists after disconnecting

I'm trying to write a longpolling server with Twisted, but I'm afraid I'm not understanding the request management. When the client navigates away from the page, I can see it continue to loop in the console. I thought the instance would just destroy…
Coder1
  • 13,139
  • 15
  • 59
  • 89
1
vote
0 answers

Twisted: let one Factory fire event for the other on data update

I have seen this answer Sending data received in one Twisted factory to second factory , but my problem is somewhat different. I have two servers each listening on their own ports for incoming connections. Server 1 (XMLFactory) receives request from…
astro
  • 17
  • 4
1
vote
1 answer

AS3 server socket, progress event, readutfbytes

having a bit of an issue here. I am working on a multiplayer game with flash, and using python for the server side of things. I have the socket connection working... sorta, and quite a bit of the python work done, but I am running into a weird…
WeaponsTheyFear
  • 71
  • 2
  • 2
  • 9
1
vote
1 answer

I have a twisted reactor running, how do I connect to it?

I've been following the tutorials and now have a twisted reactor running. I've used telnet to test that it does stuff but I've not managed to find anything in the twisted tutorials on how to connect to the reactor. My assumption was there would be…
Teifion
  • 108,121
  • 75
  • 161
  • 195
1
vote
2 answers

Architecture: I have to make available object properties that that is updated every couple seconds

My app maintains the state of a bunch of objects with variables. I'm using Twisted to accept socket requests and return the properties of an object. I want to make sure the app can scale for a lot of requests so I'm wondering if I should deliver the…
Coder1
  • 13,139
  • 15
  • 59
  • 89
1
vote
2 answers

Django - Render a List of File Names to Template

I am generating a template for an image gallery page. My approach is as follows: Host the images from a sub directory of an images folder The image folder will be titled the same as the gallery title The view passes a list of filenames to the…
jyore
  • 4,715
  • 2
  • 21
  • 26
1
vote
1 answer

In twisted how can I make a mixed protocol which returns Lines or Raw based on input?

I am trying to develop a mixed protocol which can return a raw response or a Line Based response based on the request. My code looks like class Receiver(LineReceiver): def lineReceived(self, line): (command, args) = self._parse_command(line) …
sheki
  • 8,991
  • 13
  • 50
  • 69
1
vote
1 answer

How to add header to downloadPage?

How to add custom header ( for example header 'accept-encoding: gzip' ) for downloadPage in Twisted ?
Bdfy
  • 23,141
  • 55
  • 131
  • 179
1
vote
2 answers

How to calculating and testing the number of concurrent connections?

Twisted server supports more than 10,000 concurrent connections. I want to write a test case to check it using Python. What I know is just using multiprocessing + threading + greenlet. My question is how to confirm Twisted's support for more than…
flreey
  • 405
  • 1
  • 6
  • 9
1
vote
4 answers

Suggestions for non-blocking & fast servers, frameworks, languages?

Our new project will get a lot of concurrent requests. I don't have a lot of experience with this. Any suggestions? I've looked at NodeJS, Twisted, EventMachine & Tornado but I don't have any way to measure how suitable they will be. Any…
CamelCamelCamel
  • 5,200
  • 8
  • 61
  • 93
1
vote
1 answer

Callback chain with independent data, not related to the chain

I am trying to perform a simple callback sequence in twisted. The idea is that I login to a service, and when the login has succeeded, I start sending commands. This is my code: from twisted.internet import reactor, defer class…
blueFast
  • 41,341
  • 63
  • 198
  • 344