c-libp2p/conn/connection.c
2017-02-13 17:41:31 -05:00

23 lines
537 B
C

#include <stdlib.h>
#include "libp2p/conn/connection.h"
struct Connection* libp2p_conn_connection_new(struct TransportDialer* transport_dialer, struct MultiAddress* multiaddress) {
struct Connection* out = NULL;
if (transport_dialer != NULL) {
out = (struct Connection*)malloc(sizeof(struct Connection));
if (out != NULL) {
//TODO implement this
}
}
return out;
}
void libp2p_conn_connection_free(struct Connection* connection) {
if (connection != NULL) {
fclose(connection->socket_handle);
free(connection);
}
}