2017-02-13 18:26:41 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "libp2p/conn/connection.h"
|
|
|
|
|
2017-02-13 22:41:31 +00:00
|
|
|
struct Connection* libp2p_conn_connection_new(struct TransportDialer* transport_dialer, struct MultiAddress* multiaddress) {
|
2017-02-13 18:26:41 +00:00
|
|
|
struct Connection* out = NULL;
|
|
|
|
|
|
|
|
if (transport_dialer != NULL) {
|
|
|
|
out = (struct Connection*)malloc(sizeof(struct Connection));
|
|
|
|
if (out != NULL) {
|
|
|
|
//TODO implement this
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return out;
|
|
|
|
}
|
2017-02-13 22:41:31 +00:00
|
|
|
|
|
|
|
void libp2p_conn_connection_free(struct Connection* connection) {
|
|
|
|
if (connection != NULL) {
|
2017-02-15 17:04:10 +00:00
|
|
|
//close(connection->socket_handle);
|
2017-02-13 22:41:31 +00:00
|
|
|
free(connection);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|