forked from cory/tildefriends
The beginnings of "What would it look like if I used a DHT for peer discovery?"
This commit is contained in:
34
src/dht.c
Normal file
34
src/dht.c
Normal file
@ -0,0 +1,34 @@
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <winsock.h>
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include "dht.h"
|
||||
|
||||
int dht_sendto(int sockfd, const void *buf, int len, int flags, const struct sockaddr *to, int tolen)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int dht_blacklisted(const struct sockaddr *sa, int salen)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dht_hash(void *hash_return, int hash_size, const void *v1, int len1, const void *v2, int len2, const void *v3, int len3)
|
||||
{
|
||||
}
|
||||
|
||||
int dht_random_bytes(void *buf, size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user