![]() | ![]() | ![]() | Tentacles Reference Manual | ![]() |
---|
tnt-edge —
#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);
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; };
gboolean tnt_edge_init (TntEdge *edge, TntNetworkCore *network_core);
edge : | |
network_core : | |
Returns : |
gboolean tnt_edge_have_node (TntEdge *edge, TntNodeID node_id);
edge : | |
node_id : | |
Returns : |
TntTcpIO* tnt_edge_get_io (TntEdge *edge, TntStreamType type);
edge : | |
type : | |
Returns : |
void tnt_edge_set_io (TntEdge *edge, TntStreamType type, TntTcpIO *io);
edge : | |
type : | |
io : |
void tnt_edge_send_message (TntEdge *edge, TntMessage *message);
edge : | |
message : |
<< tnt-tcp-listener | tnt-bandwidth-group >> |