Hi

On 04.08.2019 16:17, Alessio Vanni wrote
> A question on CADET: I wrote a silly program that scans each peer
> checking if a specific port is open (it was part of an experiment.)  The
> documentation says that if the port is closed a certain callback is
> called, but when I tried it the function is never called until the
> channel is destroyed by disconnecting from the CADET service.  Actually,
> I log a message when the function is called, but this message is never
> printed until the program exits.  I can't tell if I'm doing something
> wrong because the documentation is either outdated (at least the one in
> the website) or somewhat cryptic.  

You are not doing something wrong. There is no callback called, after
you call GNUNET_CADET_close_port. Can you please point me to the
outdated documentation.

> The question is how to make sure the
> connection with the other peer is established.  Do I have to send a
> message and see what happens?

That depends on the application logic of the app using CADET. There is a
parameter "connects" for method GNUNET_CADET_open_port.

 @param connects Function called when an incoming channel is connected.

You could send a message back to signal the channel was established. Be
aware in the context of CADET the term connection has a different
meaning from an application - that is using CADET -  point of view. For
an application it is important to have a channel established to the
other peer.

For more information on this see chapter III in
https://git.gnunet.org/bibliography.git/plain/docs/cadet.pdf

Happy hacking!

t3sserakt

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
GNUnet-developers mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnunet-developers

Reply via email to