19 lines
422 B
C
19 lines
422 B
C
|
#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
|