library to obtain our HELLO from our transport service More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_constants.h"
#include "gnunet_arm_service.h"
#include "gnunet_hello_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_transport_hello_service.h"
#include "transport.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TRANSPORT_HelloGetHandle |
Functions to call with this peer's HELLO. More... | |
Functions | |
static int | check_hello (void *cls, const struct GNUNET_MessageHeader *msg) |
Function we use for checking incoming HELLO messages. More... | |
static void | handle_hello (void *cls, const struct GNUNET_MessageHeader *msg) |
Function we use for handling incoming HELLO messages. More... | |
static void | schedule_reconnect (struct GNUNET_TRANSPORT_HelloGetHandle *ghh) |
Function that will schedule the job that will try to connect us again to the client. More... | |
static void | mq_error_handler (void *cls, enum GNUNET_MQ_Error error) |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue. More... | |
static void | reconnect (void *cls) |
Try again to connect to transport service. More... | |
struct GNUNET_TRANSPORT_HelloGetHandle * | GNUNET_TRANSPORT_hello_get (const struct GNUNET_CONFIGURATION_Handle *cfg, enum GNUNET_TRANSPORT_AddressClass ac, GNUNET_TRANSPORT_HelloUpdateCallback rec, void *rec_cls) |
Obtain the HELLO message for this peer. More... | |
void | GNUNET_TRANSPORT_hello_get_cancel (struct GNUNET_TRANSPORT_HelloGetHandle *ghh) |
Stop receiving updates about changes to our HELLO message. More... | |
library to obtain our HELLO from our transport service
Definition in file transport_api_hello_get.c.
|
static |
Function we use for checking incoming HELLO messages.
cls | closure, a struct GNUNET_TRANSPORT_Handle * |
msg | message received |
Definition at line 91 of file transport_api_hello_get.c.
References GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_HELLO_get_id(), GNUNET_i2s(), GNUNET_log, GNUNET_OK, GNUNET_SYSERR, me, msg, and GNUNET_MessageHeader::size.
|
static |
Function we use for handling incoming HELLO messages.
cls | closure, a struct GNUNET_TRANSPORT_HelloGetHandle * |
msg | message received |
Definition at line 118 of file transport_api_hello_get.c.
References msg, GNUNET_TRANSPORT_HelloGetHandle::rec, and GNUNET_TRANSPORT_HelloGetHandle::rec_cls.
|
static |
Function that will schedule the job that will try to connect us again to the client.
ghh | transport service to reconnect |
Definition at line 206 of file transport_api_hello_get.c.
References GNUNET_SCHEDULER_add_delayed(), GNUNET_TIME_STD_BACKOFF, reconnect(), GNUNET_TRANSPORT_HelloGetHandle::reconnect_delay, and GNUNET_TRANSPORT_HelloGetHandle::reconnect_task.
Referenced by mq_error_handler().
|
static |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue.
Not every message queue implementation supports an error handler.
cls | closure with the struct GNUNET_TRANSPORT_Handle * |
error | error code |
Definition at line 148 of file transport_api_hello_get.c.
References GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MQ_destroy(), GNUNET_TRANSPORT_HelloGetHandle::mq, and schedule_reconnect().
Referenced by reconnect().
|
static |
Try again to connect to transport service.
cls | the handle to the transport service |
Definition at line 167 of file transport_api_hello_get.c.
References GNUNET_TRANSPORT_HelloGetHandle::cfg, env, GNUNET_assert, GNUNET_CLIENT_connect(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_HELLO, GNUNET_MESSAGE_TYPE_TRANSPORT_START, GNUNET_MQ_handler_end, GNUNET_MQ_hd_var_size, GNUNET_MQ_msg, GNUNET_MQ_send(), handlers, GNUNET_TRANSPORT_HelloGetHandle::mq, mq_error_handler(), StartMessage::options, and GNUNET_TRANSPORT_HelloGetHandle::reconnect_task.
Referenced by GNUNET_TRANSPORT_hello_get(), and schedule_reconnect().