Implemeting NodeIO
This commit is contained in:
parent
69cbff9cd6
commit
b6a94c7c11
4 changed files with 37 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -9,6 +9,7 @@ OBJS = \
|
||||||
thirdparty/mbedtls/*.o \
|
thirdparty/mbedtls/*.o \
|
||||||
hashmap/hashmap.o \
|
hashmap/hashmap.o \
|
||||||
net/*.o \
|
net/*.o \
|
||||||
|
nodeio/*.o \
|
||||||
peer/*.o \
|
peer/*.o \
|
||||||
record/*.o \
|
record/*.o \
|
||||||
routing/*.o \
|
routing/*.o \
|
||||||
|
@ -24,6 +25,7 @@ compile:
|
||||||
cd thirdparty; make all;
|
cd thirdparty; make all;
|
||||||
cd hashmap; make all;
|
cd hashmap; make all;
|
||||||
cd net; make all;
|
cd net; make all;
|
||||||
|
cd nodeio; make all;
|
||||||
cd peer; make all;
|
cd peer; make all;
|
||||||
cd record; make all;
|
cd record; make all;
|
||||||
cd routing; make all;
|
cd routing; make all;
|
||||||
|
@ -42,6 +44,7 @@ clean:
|
||||||
cd crypto; make clean;
|
cd crypto; make clean;
|
||||||
cd hashmap; make clean;
|
cd hashmap; make clean;
|
||||||
cd net; make clean;
|
cd net; make clean;
|
||||||
|
cd nodeio; make clean;
|
||||||
cd peer; make clean;
|
cd peer; make clean;
|
||||||
cd thirdparty; make clean
|
cd thirdparty; make clean
|
||||||
cd record; make clean;
|
cd record; make clean;
|
||||||
|
|
6
include/libp2p/nodeio/nodeio.h
Normal file
6
include/libp2p/nodeio/nodeio.h
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "libp2p/net/stream.h"
|
||||||
|
|
||||||
|
int libp2p_nodeio_upgrade_stream(struct Stream* stream);
|
||||||
|
struct Node* libp2p_nodeio_get(struct Stream* stream, unsigned char* hash, int hash_length);
|
18
nodeio/Makefile
Normal file
18
nodeio/Makefile
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
CC = gcc
|
||||||
|
CFLAGS = -O0 -Wall -I../include -I../../c-protobuf
|
||||||
|
|
||||||
|
ifdef DEBUG
|
||||||
|
CFLAGS += -g3
|
||||||
|
endif
|
||||||
|
|
||||||
|
LFLAGS =
|
||||||
|
DEPS =
|
||||||
|
OBJS = nodeio.o
|
||||||
|
|
||||||
|
%.o: %.c $(DEPS)
|
||||||
|
$(CC) -c -o $@ $< $(CFLAGS)
|
||||||
|
|
||||||
|
all: $(OBJS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o
|
10
nodeio/nodeio.c
Normal file
10
nodeio/nodeio.c
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "libp2p/net/stream.h"
|
||||||
|
|
||||||
|
int libp2p_nodeio_upgrade_stream(struct Stream* stream) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Node* libp2p_nodeio_get(struct Stream* stream, unsigned char* hash, int hash_length) {
|
||||||
|
return NULL;
|
||||||
|
}
|
Loading…
Reference in a new issue