Ok,let me express what i want to do clearly. I use twisted to transfer a file.What i do is to open a file in client,then transfer it by TCP.Server received it and write it into a file. The filename in "reactor.connectTCP(HOST,PORT,TSClientFactory(filename))" is what i want to transfer. If i want to transfer two file,what i do is to write "reactor.connectTCP(HOST,PORT,TSClientFactory(filename)) reactor.run(installSignalHandlers=0)" twice.But this will be error which you have told me. Now how could i to solve this problem?
Meanwhile,if transfered file is big,the server's "dataReceived" function will be called several times to receive all the data.If i transfer all of files one time,using "reactor.connectTCP(HOST,PORT,TSClientFactory(filenameList))". It will be hard to distinguish these different files in server,because "dataReceived" just receive.Could you have some way in twisted to notice server the end of previous file and to receive a new file by recalling "dataReceived" function , instead of receiving all the data together. > -----Original E-mail----- > From: exar...@twistedmatrix.com > Sent Time: 2009-9-19 3:10:26 > To: "Twisted general discussion" <twisted-python@twistedmatrix.com> > Cc: > Subject: Re: [Twisted-Python] What is the difference in between reactor.running and reactor._stopped > > On 05:02 pm, gx1...@mail.ustc.edu.cn wrote: > > > >Thank you for your instruct! I am a new people in twisted,so I still > >have another problem. > >If i transfer a lot of data(a big file),program will hang when > >transmission finished. > >If transfering a few words ,program will give me another chance to > >input. > >what's the reason about this? > > Hi, > > I don't quite understand your message. I'm not sure how it relates to > Gabriel's question or my answer to it. Perhaps you could start a new > thread and provide more details about your program, what it does, how > you expect it to behave, and how it is actually behaving? > > Jean-Paul > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python