mirror of
https://github.com/CPunch/Laika.git
synced 2025-10-20 05:40:21 +00:00
Added cnc's panel list, minor refactoring of packets
This commit is contained in:
@@ -11,11 +11,20 @@ struct sLaika_cnc {
|
||||
uint8_t priv[crypto_kx_SECRETKEYBYTES], pub[crypto_kx_PUBLICKEYBYTES];
|
||||
struct sLaika_socket sock;
|
||||
struct sLaika_pollList pList;
|
||||
struct sLaika_peer **panels; /* holds connected panel peers */
|
||||
int panelCount;
|
||||
int panelCap;
|
||||
};
|
||||
|
||||
struct sLaika_cnc *laikaC_newCNC(uint16_t port);
|
||||
void laikaC_freeCNC(struct sLaika_cnc *cnc);
|
||||
|
||||
void laikaC_onAddPeer(struct sLaika_cnc *cnc, struct sLaika_peer *peer);
|
||||
void laikaC_onRmvPeer(struct sLaika_cnc *cnc, struct sLaika_peer *peer);
|
||||
|
||||
void laikaC_addPanel(struct sLaika_cnc *cnc, struct sLaika_peer *panel);
|
||||
void laikaC_rmvPanel(struct sLaika_cnc *cnc, struct sLaika_peer *panel);
|
||||
|
||||
void laikaC_killPeer(struct sLaika_cnc *cnc, struct sLaika_peer *peer);
|
||||
bool laikaC_pollPeers(struct sLaika_cnc *cnc, int timeout);
|
||||
|
||||
|
Reference in New Issue
Block a user