Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move DEFAULT_SOCKETEVENTS to util/sock.h
Browse files Browse the repository at this point in the history
kwvg committed Sep 26, 2024
1 parent 76290a0 commit 4ecf504
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/net.h
Original file line number Diff line number Diff line change
@@ -114,16 +114,6 @@ static const bool DEFAULT_FIXEDSEEDS = true;
static const size_t DEFAULT_MAXRECEIVEBUFFER = 5 * 1000;
static const size_t DEFAULT_MAXSENDBUFFER = 1 * 1000;

#if defined USE_KQUEUE
#define DEFAULT_SOCKETEVENTS "kqueue"
#elif defined USE_EPOLL
#define DEFAULT_SOCKETEVENTS "epoll"
#elif defined USE_POLL
#define DEFAULT_SOCKETEVENTS "poll"
#else
#define DEFAULT_SOCKETEVENTS "select"
#endif

typedef int64_t NodeId;

struct AddedNodeInfo
10 changes: 10 additions & 0 deletions src/util/sock.h
Original file line number Diff line number Diff line change
@@ -16,6 +16,16 @@
#include <string>
#include <unordered_map>

#if defined(USE_EPOLL)
#define DEFAULT_SOCKETEVENTS "epoll"
#elif defined(USE_KQUEUE)
#define DEFAULT_SOCKETEVENTS "kqueue"
#elif defined(USE_POLL)
#define DEFAULT_SOCKETEVENTS "poll"
#else
#define DEFAULT_SOCKETEVENTS "select"
#endif

/**
* Maximum time to wait for I/O readiness.
* It will take up until this time to break off in case of an interruption.

0 comments on commit 4ecf504

Please sign in to comment.