aboutsummaryrefslogtreecommitdiff
path: root/conn_data.c
blob: 1b237b4c6b013196192108dc12231aefd244e400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "conn_data.h"


void conn_data_init(struct conn_data *data,int fd){
	data->fd=fd;
	data->bufsz=512;
	data->buflen=0;
	data->buffer=malloc(data->bufsz,char);

	data->userid=-1;
}

void conn_data_nullify(struct conn_data *data){
	free(data->buffer);
	data->buffer=NULL;
	data->bufsz=0;
	data->buflen=0;

	data->userid=-1;
}