gnunet-developers
[Top][All Lists]
Advanced

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

Re: [GNUnet-developers] On applications using GNUnet


From: t3sserakt
Subject: Re: [GNUnet-developers] On applications using GNUnet
Date: Tue, 6 Aug 2019 07:33:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Icedove/52.9.1

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]