2015-11-06 06:57:03 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2016-01-13 06:01:36 +08:00
|
|
|
#include <string.h>
|
|
|
|
#include <getopt.h>
|
2015-11-06 06:57:03 +08:00
|
|
|
|
2016-01-13 06:01:36 +08:00
|
|
|
#define SOFTWARE_NAME "ddcd"
|
|
|
|
#define MSG_START SOFTWARE_NAME ": "
|
2015-12-02 21:51:20 +08:00
|
|
|
|
|
|
|
typedef enum ddc_method_e
|
|
|
|
{
|
|
|
|
M_TD,
|
|
|
|
M_FASTDDC
|
|
|
|
} ddc_method_t;
|
|
|
|
|
2016-01-13 06:01:36 +08:00
|
|
|
void print_exit(const char* why);
|
|
|
|
|
|
|
|
typedef struct client_s
|
|
|
|
{
|
|
|
|
struct sockaddr_in addr;
|
|
|
|
int socket;
|
|
|
|
int error;
|
|
|
|
pthread_t thread;
|
|
|
|
} client_t;
|
2015-12-02 21:51:20 +08:00
|
|
|
|