library to access the low-level P2P IO 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_service.h"
#include "transport.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TRANSPORT_ManipulationHandle |
Handle for the transport service (includes all of the state for the transport service). More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "transport-api", __VA_ARGS__) |
Functions | |
static void | disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_ManipulationHandle *h) |
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... | |
void | GNUNET_TRANSPORT_manipulation_set (struct GNUNET_TRANSPORT_ManipulationHandle *handle, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_ATS_Properties *prop, struct GNUNET_TIME_Relative delay_in, struct GNUNET_TIME_Relative delay_out) |
Set transport metrics for a peer and a direction. More... | |
struct GNUNET_TRANSPORT_ManipulationHandle * | GNUNET_TRANSPORT_manipulation_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) |
Connect to the transport service. More... | |
void | GNUNET_TRANSPORT_manipulation_disconnect (struct GNUNET_TRANSPORT_ManipulationHandle *handle) |
Disconnect from the transport service. More... | |
library to access the low-level P2P IO service
Definition in file transport_api_manipulation.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "transport-api", __VA_ARGS__) |
Definition at line 35 of file transport_api_manipulation.c.
|
static |
Function that will schedule the job that will try to connect us again to the client.
h | transport service to reconnect |
Definition at line 145 of file transport_api_manipulation.c.
References GNUNET_assert, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_add_delayed(), GNUNET_TIME_STD_BACKOFF, h, GNUNET_ARM_Handle::mq, reconnect(), and GNUNET_ARM_Handle::reconnect_task.
Referenced by GNUNET_TRANSPORT_manipulation_disconnect(), and 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_ManipulationHandle * |
error | error code |
Definition at line 92 of file transport_api_manipulation.c.
References disconnect_and_schedule_reconnect(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_YES, h, and LOG.
Referenced by reconnect().
|
static |
Try again to connect to transport service.
cls | the handle to the transport service |
Definition at line 110 of file transport_api_manipulation.c.
References GNUNET_ARM_Handle::cfg, env, GNUNET_assert, GNUNET_CLIENT_connect(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_MESSAGE_TYPE_TRANSPORT_START, GNUNET_MQ_handler_end, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_NO, h, handlers, LOG, GNUNET_ARM_Handle::mq, mq_error_handler(), and GNUNET_ARM_Handle::reconnect_task.
Referenced by disconnect_and_schedule_reconnect(), and GNUNET_TRANSPORT_manipulation_connect().