run tcp server

This commit is contained in:
PolynomialDivision 2017-10-06 17:10:33 +02:00
parent acf109d337
commit edcf7e0c8d
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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;

View file

@ -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){