csdr/ddcd.h

29 lines
496 B
C
Raw Normal View History

#pragma once
#include <signal.h>
#include <stdio.h>
#include <getopt.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <iostream>
#include <vector>
#include <unistd.h>
#include <fcntl.h>
typedef struct client_s
{
struct sockaddr_in addr;
int socket;
pid_t pid;
int pipefd[2];
} client_t;
2015-11-04 20:31:47 +08:00
void client();
void error_exit(const char* why);
void print_client(client_t* client, const char* what);