@ -1,8 +1,8 @@
#pragma once
// Public stuff
struct Client;
typedef struct Client* Client;
struct ClientImp;
typedef struct ClientImp* Client;
#include "message.h"
#include "chassis.h"
@ -2,7 +2,7 @@
#include <stdint.h>
struct Client {
struct ClientImp {
uint16_t seq;
@ -124,7 +124,7 @@ connection_new(unsigned int source_port, const char* source_ip, unsigned int des
}
struct Connection*
connection_poll_ready(struct Client* client) {
connection_poll_ready(struct ClientImp* client) {
// Return a null connection if no sockets have been opened
if(max_fd < 0)
@ -16,7 +16,7 @@ struct Connection*
connection_new(unsigned int source_port, const char* source_ip, unsigned int dest_port, const char* dest_ip);
connection_poll_ready(struct Client* client);
connection_poll_ready(struct ClientImp* client);
void
connection_read(struct Connection* connection, union Message* resp);
@ -19,7 +19,7 @@ struct RobotImp {
struct FragmentLink *free;
} frag_queue;
struct Client* client;
struct ClientImp* client;
int16_t wheels[4];
@ -8,8 +8,8 @@
#include <string.h>
Client client_new() {
struct Client* client = malloc(sizeof(struct Client));
memset(client, 0, sizeof(struct Client));
struct ClientImp* client = malloc(sizeof(struct ClientImp));
memset(client, 0, sizeof(struct ClientImp));
// TODO: Make this configurable
return client;