markqvist/Reticulum

rncp: add blocking function to receive

pizdjuk opened this issue · 2 comments

Problem: right now it is needed

  1. add callback function for link_established
  2. do sleep in a loop waiting for callback function triggered

I dont know, if Reticulum API offers such a possibility, but if not, it would be worth to do. Some blocking function, that wait for some maximum time till link is established.

I don't understand exactly what you mean here. Can you describe what you are trying to do, and how it goes wrong?

I don't understand exactly what you mean here. Can you describe what you are trying to do, and how it goes wrong?

In function receive of rncp

def receive(configdir, verbosity = 0, quietness = 0, allowed = [], display_identity = False, limit = None, disable_auth = None, disable_announce = False):

at the and of the function we enter in permanent cycle

while True:

I think, this is not the best method. As I understand a better way could be add some blocking function. It is much more easy as already is: unblocking callbacks. But sometimes (like this one) it is still useful to have a blocking one.