Commit Graph

66 Commits (85dde7b6b08a7b0ce22939ef116402394b3a7c91)

Author SHA1 Message Date
Michael 85dde7b6b0
Move remaining include/llarp headers to llarp/ 6 years ago
despair d26141d433 Merge branch 'dev' into reeeee-divergence
ok hope this works -rick

# Conflicts:
#	.gitignore
#	.vscode/settings.json
#	include/llarp/service/context.hpp
#	llarp/dns.cpp
#	llarp/dnsc.cpp
#	llarp/ev.cpp
#	llarp/ev.hpp
#	llarp/ev_win32.hpp
#	llarp/net.cpp
#	llarp/router.cpp
#	llarp/router.hpp
#	llarp/service/context.cpp
6 years ago
Jeff Becker baa94ec345
make windows build happy 6 years ago
despair 309ba48f95 !!! 6 years ago
despair 551bf0d2bf fix TUN read pkt 6 years ago
despair 65ff1ba991 reading from TUN using native async io:
writing: 
6 years ago
Jeff Becker c1e494c2c4
have llarp_ev_* use llarp_buffer_t 6 years ago
despair 964e834fea finally get the right error on windows
fix

fix up errno on win32

test
6 years ago
despair b9ab1f19a9 wooooo path builds work
update readme

fix gcc 8.x error
fix apple cross-clang someday
6 years ago
despair c7d3e39c53 todo: check if we're adding a tun to the event loop
if so, add it to the listeners, but _not_ the epollfd
abstraction - epollfd takes _only_ sockets, and will reeeee
if you give it a file handle. fuck 16-bit Windows with a rusty
knife. In this case, we assume (like unix) that a file/device file
is _always_ ready to write
6 years ago
despair ae616d0fa5 minor fixes
eh

why apple why

why apple why
6 years ago
despair be7ac352ca switch to a simulation of epoll
the native async event system on windows
is _not_ very good at getting external events
(i.e. we receive data, but we don't get any indication
that this ever happened)
6 years ago
despair c325246beb need to start winsock to use any networking
try fixing this
6 years ago
despair e18f786ab2 refactor event loop stuff
find some place in the C code to place the worker thread procedure
until such time that michael presents the new thread pool class

fix unix

get a new event port each time and delet in the event loop after use
6 years ago
despair 715e59808e bad merge! 6 years ago
despair f6fb063684 this is driving me at least mildly insane
we _never_ get to llarp::udp_listener::read
6 years ago
despair d311b2e9a9 remove dead code
(rip golden shield users D:)

remove more dead code

debug udp stuff

remove debug kqueue
6 years ago
Jeff Becker a59343cfec
we NEED NT >= 6 for event loop 6 years ago
Jeff Becker d408b08889
make windows cross compile pass, make format parts of libutp 6 years ago
despair 2a5a0f1577 fix warnings on windows
up next: fix netbsd
6 years ago
despair 04e620ebf2 add iocp tcp connect
msys2 grabs its reactos sdk headers straight out of git
most cross-compilers use the versioned releases (v6 as of last week)

huh. for once setting the windows version macros doesn't break anything.
6 years ago
despair 57ea36f947 i knew i was forgetting something earlier 6 years ago
despair 6e862f1acf apple compiler reeeeee 6 years ago
despair 561c5228d3 fixed race condition in event loop....dns seems to work now :DDD 6 years ago
despair 45f46fbece this...looks promising :DDDDD 6 years ago
despair 186e2ea989 refactored event loop base classes
use the base class impl for llarp::tcp_conn::sendto

can't seem to escape quotes ;-;

yeah this need to stay out of the unix build

turn on gnu extensions

apple stuff

remove duplicate code

clean up

fix vtable

clang-format

parameter checks
6 years ago
despair 5a32ccf220 scan-build fixes on win32 code paths 6 years ago
despair 38f2a6b2c9 be slightly less annoying
check build rules
6 years ago
despair c5d1b32286 remove microsoft c++ crud
🤔🤔🤔🤔
6 years ago
despair 5aba9776d0 fix unit test 6 years ago
despair d425b5d308 implement tcp evloop on win32
(with its now-obsolete distinction between socketfd and fd)

sockets and file descriptors used to be distinct objects....back in the
16-bit Winsock 1.1 era, which needlessly complicated the 32-bit port
back then. these days one can use [Read|Write]File(2) to operate on
sockfds...which also have some of the semantics of [read|write]v(2)
i.e. the scatter-gather thing it's known for is done in async handler

-rick

variants are nice

added note to self

clang-format

link abyss properly

oops

shut up

*shrugs*

oops forgot to start winsock

moved our async io status flags to the base class

let derived classes override them as needed

this is probably a synchronous op _anyway_

fix typo

wtf
6 years ago
despair86 d8cfac47a8
ok updated to match recent changes 6 years ago
Jeff 1cb2bb6136 Merge branch 'dev' 6 years ago
despair86 1a46631454 remove unused code 6 years ago
despair86 9d546cbac4 separate read and write event ports to avoid overwriting queue events 6 years ago
despair86 d4a7dfd08d remove extra code, pass the buffer size to read() directly, check for overflow 6 years ago
Jeff Becker 9a962540fb
update eventloop on win32 6 years ago
Jeff Becker d7c188d817
Revert "add a check for overlow in event loop"
This reverts commit 1042c73829.
6 years ago
Jeff Becker 1042c73829
add a check for overlow in event loop 6 years ago
despair86 7f226d7734 revert merge
(i can put these in the dev branch for now)
6 years ago
despair86 5576254c2e make it compile on nt 6 years ago
Jeff Becker 32a028f6d8
Merge remote-tracking branch 'cathugger/master' 6 years ago
despair86 3c13101beb clang-format 6 years ago
despair86 3c7b7f2176 overlapped io pending is NOT an error 6 years ago
despair86 31c8aee3c1 woooooooooooooo
lokinet on win32 is now live
and the server code is more stable than the client code
6 years ago
despair86 2326ad0339 added note 6 years ago
despair86 94c5f46d33 try fixing win32 event loop 6 years ago
despair86 6ba60093d2 switch to std::variant for win32 ev_io
- sockets are a distinct (non-negative) file descriptor
- plain old file descriptors are opaque handles

this makes the specialisations of llarp::ev_io on win32 type-safe as
- TAP-Windows v9 adapter is a plain old device file (same as on UNIX and Linux)
- UDP listeners are sockets, so the type must change (from signed to unsigned int) to accomodate Winsock2
6 years ago
despair86 ca0d09142a Finally put together some skeletal TUN code for NT
up next: debugging the windows client code
stretch goal: prototype hosting a full masternode on Windows Server (still _highly_ experimental when it _does_ appear)
6 years ago
despair86 991c1d8fce fix 6 years ago