2022-01-24 03:28:16 +00:00
|
|
|
#ifndef LAIKA_CNC_H
|
|
|
|
#define LAIKA_CNC_H
|
|
|
|
|
|
|
|
#include "laika.h"
|
2022-01-24 15:51:29 +00:00
|
|
|
#include "lpacket.h"
|
2022-01-24 03:28:16 +00:00
|
|
|
#include "lsocket.h"
|
|
|
|
#include "lpolllist.h"
|
2022-01-24 16:34:30 +00:00
|
|
|
#include "lpeer.h"
|
2022-01-24 03:28:16 +00:00
|
|
|
|
2022-01-24 16:34:30 +00:00
|
|
|
struct sLaika_cnc {
|
2022-02-03 22:25:49 +00:00
|
|
|
uint8_t priv[crypto_kx_SECRETKEYBYTES], pub[crypto_kx_PUBLICKEYBYTES];
|
2022-01-24 03:28:16 +00:00
|
|
|
struct sLaika_socket sock;
|
2022-01-24 16:34:30 +00:00
|
|
|
struct sLaika_pollList pList;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct sLaika_cnc *laikaC_newCNC(uint16_t port);
|
|
|
|
void laikaC_freeCNC(struct sLaika_cnc *cnc);
|
|
|
|
|
|
|
|
void laikaC_killPeer(struct sLaika_cnc *cnc, struct sLaika_peer *peer);
|
|
|
|
bool laikaC_pollPeers(struct sLaika_cnc *cnc, int timeout);
|
2022-01-24 03:28:16 +00:00
|
|
|
|
|
|
|
#endif
|