[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Difference between polling in examples
[Thread Prev] | [Thread Next]
- Subject: Difference between polling in examples
- From: lucky62 <lucky62@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sat, 12 Dec 2020 20:09:31 +0100
- To: libssh@xxxxxxxxxx
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 usedthis 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