diff options
Diffstat (limited to 'conn_data.c')
-rw-r--r-- | conn_data.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/conn_data.c b/conn_data.c new file mode 100644 index 0000000..1b13cec --- /dev/null +++ b/conn_data.c @@ -0,0 +1,16 @@ +#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); +} + +void conn_data_nullify(struct conn_data *data){ + free(data->buffer); + data->buffer=NULL; + data->bufsz=0; + data->buflen=0; +} |