TAPI to manage bttrack torrent tracker (tapi_bttrack)

Overview

TAPI to manage bttrack torrent tracker (from bittornado package). More…

// typedefs

typedef struct tapi_bttrack_app tapi_bttrack_app;
typedef struct tapi_bttrack_opt tapi_bttrack_opt;

// structs

struct tapi_bttrack_app;
struct tapi_bttrack_opt;

// global variables

const tapi_bttrack_opt tapi_bttrack_default_opt;

// global functions

te_errno tapi_bttrack_create(tapi_job_factory_t* factory, const char* ip, tapi_bttrack_opt* opt, tapi_bttrack_app** app);
te_errno tapi_bttrack_start(tapi_bttrack_app* app);
te_errno tapi_bttrack_wait(tapi_bttrack_app* app, int timeout_ms);
te_errno tapi_bttrack_kill(tapi_bttrack_app* app, int signum);
te_errno tapi_bttrack_stop(tapi_bttrack_app* app);
te_errno tapi_bttrack_destroy(tapi_bttrack_app* app);

Detailed Documentation

TAPI to manage bttrack torrent tracker (from bittornado package).

Copyright (C) 2021-2022 OKTET Labs Ltd. All rights reserved.

Typedefs

typedef struct tapi_bttrack_opt tapi_bttrack_opt

bttrack specific options

Global Variables

const tapi_bttrack_opt tapi_bttrack_default_opt

Default bttrack options initializer

Global Functions

te_errno tapi_bttrack_create(tapi_job_factory_t* factory, const char* ip, tapi_bttrack_opt* opt, tapi_bttrack_app** app)

Create bttrack app.

Parameters:

factory

Job factory.

ip

IP address of the tracker.

opt

bttrack options.

app

bttrack app handle.

Returns:

Status code.

te_errno tapi_bttrack_start(tapi_bttrack_app* app)

Start bttrack.

Parameters:

app

bttrack app handle.

Returns:

Status code.

te_errno tapi_bttrack_wait(tapi_bttrack_app* app, int timeout_ms)

Wait for bttrack completion.

Parameters:

app

bttrack app handle.

timeout_ms

Wait timeout in milliseconds.

Returns:

Status code.

te_errno tapi_bttrack_kill(tapi_bttrack_app* app, int signum)

Send a signal to bttrack.

Parameters:

app

bttrack app handle.

signum

Signal to send.

Returns:

Status code.

te_errno tapi_bttrack_stop(tapi_bttrack_app* app)

Stop bttrack. It can be started over with tapi_bttrack_start().

Parameters:

app

bttrack app handle.

Returns:

Status code.

te_errno tapi_bttrack_destroy(tapi_bttrack_app* app)

Destroy bttrack app (free memory, etc.).

Parameters:

app

bttrack app handle.

Returns:

Status code.