#ifndef SRVCTRLSOCKET_H
#define SRVCTRLSOCKET_H
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct SrvConnection {
int socket;
FILE *stream;
} SrvConnection;
typedef struct SrvMsg {
int type;
char *message;
size_t length;
} SrvMsg;
SrvConnection* srvctrl_connet(char *socketfile);
void srvctrl_close(SrvConnection *conn);
int srvctrl_readmsg(SrvConnection *conn, SrvMsg *msg);
#ifdef __cplusplus
}
#endif
#endif