tnt-edge

tnt-edge —

Synopsis




#define     TNT_EDGE                        (object)
struct      TntEdge;
gboolean    tnt_edge_init                   (TntEdge *edge,
                                             TntNetworkCore *network_core);
TntEdge*    tnt_edge_new                    (TntNetworkCore *network_core);
void        tnt_edge_finalize               (FluxObject *edge);
TntNodeIP4  tnt_edge_get_peer_ip4           (TntEdge *edge);
gboolean    tnt_edge_have_node              (TntEdge *edge,
                                             TntNodeID node_id);
TntTcpIO*   tnt_edge_get_io                 (TntEdge *edge,
                                             TntStreamType type);
void        tnt_edge_set_io                 (TntEdge *edge,
                                             TntStreamType type,
                                             TntTcpIO *io);
gboolean    tnt_edge_get_qualified          (TntEdge *edge);
void        tnt_edge_send_message           (TntEdge *edge,
                                             TntMessage *message);

Description

Details

TNT_EDGE()

#define TNT_EDGE(object) ((TntEdge *) object)

object :

struct TntEdge

struct TntEdge {

  FluxObject      object;

  TntNetworkCore *network_core;

  TntTimeStamp    creation_time;

  guint64         peer_fingerprint;
  gint            remote_listening_port;
  TntTcpIO       *control_tcp_io;
  TntTcpIO       *data_tcp_io;

  /* Seen nodes are prepended (or moved) to the list head. If the
   * list reaches its limit, nodes are freed from the tail. */
  guint           reachable_nodes_count;
  GList          *reachable_nodes_list;
  GList          *reachable_nodes_last;

  /* Indexes GList nodes by node ID */
  GHashTable     *reachable_nodes_table;

  /* Set if this node is qualified as sending/receiving data by
   * user request. */
  gint            qualification_refs;
  gdouble         score;
};


tnt_edge_init ()

gboolean    tnt_edge_init                   (TntEdge *edge,
                                             TntNetworkCore *network_core);

edge :
network_core :
Returns :

tnt_edge_new ()

TntEdge*    tnt_edge_new                    (TntNetworkCore *network_core);

network_core :
Returns :

tnt_edge_finalize ()

void        tnt_edge_finalize               (FluxObject *edge);

edge :

tnt_edge_get_peer_ip4 ()

TntNodeIP4  tnt_edge_get_peer_ip4           (TntEdge *edge);

edge :
Returns :

tnt_edge_have_node ()

gboolean    tnt_edge_have_node              (TntEdge *edge,
                                             TntNodeID node_id);

edge :
node_id :
Returns :

tnt_edge_get_io ()

TntTcpIO*   tnt_edge_get_io                 (TntEdge *edge,
                                             TntStreamType type);

edge :
type :
Returns :

tnt_edge_set_io ()

void        tnt_edge_set_io                 (TntEdge *edge,
                                             TntStreamType type,
                                             TntTcpIO *io);

edge :
type :
io :

tnt_edge_get_qualified ()

gboolean    tnt_edge_get_qualified          (TntEdge *edge);

edge :
Returns :

tnt_edge_send_message ()

void        tnt_edge_send_message           (TntEdge *edge,
                                             TntMessage *message);

edge :
message :