mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
run tcp server
This commit is contained in:
parent
acf109d337
commit
edcf7e0c8d
3 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <netinet/in.h>
|
||||
|
||||
int run_tcp_socket();
|
||||
void *run_tcp_socket(void *arg);
|
||||
int add_tcp_conncection(char* ipv4, int port);
|
||||
|
||||
struct network_con_s
|
||||
|
|
|
@ -42,6 +42,7 @@ pthread_t tid_client;
|
|||
pthread_t tid_get_client;
|
||||
pthread_t tid_kick_clients;
|
||||
pthread_t tid_ap;
|
||||
pthread_t tid_tcp_server;
|
||||
pthread_t tid_connections;
|
||||
|
||||
void daemon_shutdown()
|
||||
|
@ -174,7 +175,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
|
||||
// run_tcp_socket();
|
||||
pthread_create(&tid_tcp_server, NULL, &run_tcp_socket, NULL);
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define FALSE 0
|
||||
#define PORT 1025
|
||||
|
||||
int run_tcp_socket()
|
||||
void *run_tcp_socket(void *arg)
|
||||
{
|
||||
int opt = TRUE;
|
||||
int master_socket, addrlen, new_socket, client_socket[30],
|
||||
|
@ -172,7 +172,6 @@ int run_tcp_socket()
|
|||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int add_tcp_conncection(char* ipv4, int port){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue