[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Difference between polling in examples


Hello,

I am trying to understand how the polling functions work.
In the examples I see two different ways.


In the *ssh_client* example:
        the *connectors* are used
        connectors are attached to the event by *ssh_event_add_connector*
*ssh_event_dopoll*( event, *60000 *) is called

In the *sshd_direct-tcpip* example:
        custom struct *event_fd_data* is used
        this struct & socket & channel are attached to the event by *ssh_event_add_fd*
*ssh_event_dopoll*( mainloop, *100* ) is called


So the questions:
    What is the better way? (criteria: usage simplicity, speed, other?)
    How to tune the *timeout* in ssh_event_dopoll function? (Why there is the big difference between these examples?)


Thanks in advance
Jan

Archive administrator: postmaster@lists.cynapses.org