Network wrapper protocol as part of the practical master thesis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
475 B

//
// Created by root on 10/30/19.
//
#ifndef ECDAA_ISSUER_CONNECTION_H
#define ECDAA_ISSUER_CONNECTION_H
#include <stdio.h>
#include <stdlib.h>
typedef enum conntype {
CONN_TYPE_SERVER,
CONN_TYPE_CLIENT
}conntype_e;
typedef struct connection {
int fd;
conntype_e type;
} connection_t;
typedef int (*conn_handler)(int fd);
connection_t* connection_create(conntype_e type);
int connection_destroy(connection_t* conn);
#endif //ECDAA_ISSUER_CONNECTION_H