-
Notifications
You must be signed in to change notification settings - Fork 0
/
connmgr.h
35 lines (31 loc) · 1.05 KB
/
connmgr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* \author Arthur Tavares Quintao
*/
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include <pthread.h>
#include <stdio.h>
#include "lib/tcpsock.h"
#include "lib/dplist.h"
#include "config.h"
/**
* The connection manager thread is responsible for:
* 1. Listening for new connections from sensors on a TCP socket
* 2. Creating a new thread for each new connection
* 2.1. the new thread is responsible for reading the data from the sensor
*
* @param client - a double pointer, that will be filled out with the newly created socket for the connection with the client
* @return void
*/
void *client_manager(void *client);
/**
* The connection manager thread is responsible for:
* 1. Listening for new connections from sensors on a TCP socket
* 2. Creating a new thread for each new connection
* 2.1. the new thread is responsible for reading the data from the sensor
*
* @param port the port number to listen for connections
* @return void
*/
void *connection_manager(void *port);