aboutsummaryrefslogtreecommitdiff
path: root/conn_data.h
blob: 4c6ab076219f763f4f9d85b9769884c15ad67ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include "global.h"


struct conn_data{
	int fd;
	i64 bufsz,buflen;
	char *buffer;

	i64 protversion;  // -1 if not negotiated yet
	i64 userid;  // -1 if not logged in
};

void conn_data_init(struct conn_data *data,int fd);  // Initialises buffers
void conn_data_nullify(struct conn_data *data);  // Frees buffers but not the data itself