[Twisted-Python] Twisted Client

Jarrod Roberson jarrod at vertigrated.com
Tue Nov 10 19:30:31 MST 2009


On Tue, Nov 10, 2009 at 11:27 AM, Kevin Horn <kevin.horn at gmail.com> wrote:

> On Tue, Nov 10, 2009 at 7:25 AM, morbidux <morbidux at free.fr> wrote:
>
>> Hi all,
>>
>> I'm writing a simple client / server application, that uses a small
>> protocol to dialog.
>>
>> I can't find in documentation any exemple that would correspond to what my
>> client is supposed to do.
>>
>> Here is the basics :
>>
>>  every X seconds, call a function that check a file
>>  if file is different, connect to server
>>
>> When the client is connected, it immediatly sends data to server, using
>> the connectionMade method.
>>
>> Do I need to use while(1) loop or loopingCall ? What is the best way to
>> write a daemon that connect to a server every X seconds ?
>>
>> Many thanks.
>>
>
What platform? For linux you could do away with the polling and use the
python bindings to inotify.
On OSX there are bindings to FSEvent API. Much better than a polling
solution.

-- 
Jarrod Roberson
678.551.2852
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20091110/f6c4608e/attachment-0001.html>


More information about the Twisted-Python mailing list