cbitcoin
 All Data Structures Files Functions Variables Typedefs
src/structures/CBObject/CBMessage/CBNetworkAddress/CBPeer/CBPeer.h File Reference

Contains data for managing peer connections. Inherits CBNetworkAddress. More...

#include "CBNetworkAddress.h"
#include "CBVersion.h"
#include <time.h>

Go to the source code of this file.

Data Structures

struct  CBPeer
 Structure for CBPeer objects. More...

Functions

CBPeerCBNewNodeByTakingNetworkAddress (CBNetworkAddress *addr)
 Creates a new CBPeer object.
CBPeerCBGetNode (void *self)
 Gets a CBPeer from another object. Use this to avoid casts.
bool CBInitNodeByTakingNetworkAddress (CBPeer *self)
 Initialises a CBPeer object.
void CBFreeNode (void *self)
 Frees a CBPeer object.

Detailed Description

Contains data for managing peer connections. Inherits CBNetworkAddress.


Function Documentation

void CBFreeNode ( void *  self)

Frees a CBPeer object.

Parameters:
selfThe CBPeer object to free.
CBPeer* CBGetNode ( void *  self)

Gets a CBPeer from another object. Use this to avoid casts.

Parameters:
selfThe object to obtain the CBPeer from.
Returns:
The CBPeer object.

Initialises a CBPeer object.

Parameters:
selfThe CBPeer object to initialise
Returns:
true on success, false on failure.

Creates a new CBPeer object.

Returns:
A new CBPeer object.