This repository has been archived on 2021-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
lemonbbs/src/connlist.h

19 lines
422 B
C
Raw Permalink Normal View History

2021-12-15 11:52:53 -06:00
#ifndef CHATSERVER_CONNLIST_H
#define CHATSERVER_CONNLIST_H
#include <stdint.h>
#include "oslib.h"
struct Connection {
uint8_t state;
struct LemonClientSocket socket;
int64_t userId; // -1 if not logged in
char username[64]; // to reduce db calls
};
struct Connection* allocateConnection();
void deallocateConnection(struct Connection* connection);
void initConnList(unsigned int maxConnCount);
#endif