#include "system.h"
-#include "cipher.h"
#include "connection.h"
#include "logger.h"
+#include "meshlink_internal.h"
#include "meta.h"
#include "net.h"
#include "protocol.h"
}
buffer_add(&c->outbuf, buffer, length);
- io_set(&c->io, IO_READ | IO_WRITE);
+ io_set(&mesh->loop, &c->io, IO_READ | IO_WRITE);
return true;
}
if(c->allow_request == ID) {
buffer_add(&c->outbuf, buffer, length);
- io_set(&c->io, IO_READ | IO_WRITE);
+ io_set(&mesh->loop, &c->io, IO_READ | IO_WRITE);
return true;
}
}
void broadcast_meta(connection_t *from, const char *buffer, int length) {
- for list_each(connection_t, c, connection_list)
+ for list_each(connection_t, c, mesh->connections)
if(c != from && c->status.active)
send_meta(c, buffer, length);
}
if(c->tcplen) {
if(length != c->tcplen)
return false;
- receive_tcppacket(c, data, length);
+ receive_tcppacket(mesh, c, data, length);
c->tcplen = 0;
return true;
}