summaryrefslogtreecommitdiffstats
path: root/src/main.c
blob: 0785b39c6f5d0ffb545e965073fdfb4da9a21ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stddef.h>
#include <assert.h>
#include <ltdl.h>

#include "core.h"
#include "mainloop.h"
#include "module.h"

int main(int argc, char *argv[]) {
    struct mainloop *m;
    struct core *c;
    int r;

    r = lt_dlinit();
    assert(r == 0);
    
    m = mainloop_new();
    assert(m);
    c = core_new(m);
    assert(c);

    module_load(c, "sink-pipe", NULL);
    module_load(c, "protocol-simple-tcp", NULL);
    
    mainloop_run(m);
    
    core_free(c);
    mainloop_free(m);

    lt_dlexit();
    
    return 0;
}