[Twisted-Python] how to design protocol.
adigeaydin at gmail.com
Mon Dec 1 08:19:47 EST 2008
Let me explain my problem.. I am building an uploader application using
twisted. I am using "Protocol" in both side. What is the best way to
When i try to call "self.transport.write(data)" it doesnt send data
immediately, it is sending with some other datas whic i send them later. Why
doesnt it send, what for is it waiting?
when i some information data I am sending with '\n' (there is no other '\n'
in my data) to separate it in the client side but it is getting really
complicated. When i start to send file there is no problem, first send
fileSize then read everything and write in a file till fileSize.
I saw FileWrapper in the api but i couldnt find any tip that how it works,
is it for sending file, is it right way to my goal?
What about sending data like HTTP? What do you think about this way?
8 #bytes of data
3 #bytes of data
0 #finished sending data
I need your suggestions all about these.
(some links, documents, tips would be great)
Uluslararası Bilgisayar Enstitüsü
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python