Commit graph

59 commits

Author SHA1 Message Date
Sönke Ludwig
dbb8267540 Introduce TimerCallback2.
This allows getting notified also if the timer has been stopped, so that it is guaranteed to be called, except if cancelWait is called.

Necessary for fixing vibe-d/vibe-core#86
2018-10-27 14:11:11 +02:00
Sönke Ludwig
e2e8bf30aa Change shutdown behavior to allow graceful handle leaks.
This avoids crashing in case of any handle references left-over in GC allocated memory that gets finalized after module destructors have already been run.
2018-10-26 20:40:22 +02:00
Sönke Ludwig
0b73eda8d5 Deprecate the non-nogc userData overload.
This allows more of the implementation to become nogc.
2018-10-24 11:38:14 +02:00
Sönke Ludwig
e7e4a0f5f5 Make the Posix driver initialization nogc. 2018-10-24 11:38:14 +02:00
Boris-Barboris
ed9fdcd467 ease asserting, constants wrapped for future robustness 2018-06-06 11:45:36 +00:00
Boris-Barboris
322438697c TCP_USER_TIMEOUT 2018-04-02 14:02:09 +00:00
Boris-Barboris
cdb141ba4a add setKeepAliveParams method 2018-04-02 11:11:28 +00:00
Sönke Ludwig
b09d15d503 Fix dangling handles resulting from actively closing a file. 2018-03-17 17:11:03 +01:00
Sönke Ludwig
16e2d9587d Implement EventDriverCore.runInOwnerThread. 2018-03-16 16:11:46 +01:00
Sönke Ludwig
7bfbb64899 Add userData!T properties for all descriptor based primitives. 2018-03-16 13:39:03 +01:00
Sönke Ludwig
02de8341aa Call the callback on connectStream socket creation failure.
The callback must *always* be called at some point, because the generic async->sync logic in vibe-core otherwise has no way to know whether to expect a callback or not.
2018-03-14 20:43:40 +01:00
Sönke Ludwig
815db0727c Change all invalid handle values to ~0 and improve FileChange.
FileChange now has the full path of a file split into the base path (as specified when creating the watcher), the sub directory, and the file name. This allows to work with less dynamic memory allocations internally.
2017-11-21 10:42:14 +01:00
Sönke Ludwig
569b75e050 More detailed documentation for cancelConnectStream(). 2017-11-12 14:34:58 +01:00
Boris-Barboris
36b0413d32 remove cabblack invocation 2017-11-11 15:44:13 +00:00
Boris-Barboris
0cac9d56e0 cancelConnectStream for Posix 2017-11-11 01:14:54 +00:00
Sönke Ludwig
28e1a83057 Add an interface_index argument to joinMulticastGroup. 2017-09-11 13:35:34 +02:00
Sönke Ludwig
06c6e0a4ca
Add basic UDP multicast support.
This also adds a new setOption method to handle boolean socket options in a generic way.
2017-09-03 18:14:57 +02:00
Sönke Ludwig
dd873ec6cf
Add example to get(Local/Remove)Address and fix some ddoc syntax errors. 2017-08-12 21:25:27 +02:00
Sönke Ludwig
ab796477e2 Move .userData to the socket driver.
Generally each FD type should have its own .userData property in the respective driver. This is important for drivers that don't have a unified file descriptor space and need to store user data in a type specific way.
2017-06-24 22:01:32 +02:00
Sönke Ludwig
1d330d6330
Extend datagram socket API.
Adds .setTargetAddress() and makes .getXAddress() work for datagram sockets, too.
2017-03-10 22:46:43 +01:00
Sönke Ludwig
2e5b13ee98
Add EventDriverSockets.getRemoteAddress. 2017-03-10 20:25:28 +01:00
Sönke Ludwig
6851776358
Add EventDriverTimers.isUnique. 2017-01-30 19:54:38 +01:00
Sönke Ludwig
3d81854214
Add StreamListenOptions.
Can be used to set the SO_REUSEPORT option for multi-thread/multi-process incoming TCP connection distribution.
2017-01-27 22:09:05 +01:00
Sönke Ludwig
b556849af2 Fully fix the Win64 build (test might still fail). 2017-01-23 10:03:36 +01:00
Sönke Ludwig
2c4534d178 Fix Win64 build. 2017-01-23 09:09:30 +01:00
Sönke Ludwig
f5b514899a Add basic documentation for the driver interface. 2017-01-22 11:39:01 +01:00
Sönke Ludwig
ca81d25645 Implement socket adoption and fix wait loops on Windows for the Posix driver. 2017-01-22 10:43:18 +01:00
Sönke Ludwig
922c9e8e72 Revert "Make the address parameter of send() scoped."
This reverts commit 1385250884.
2017-01-22 03:16:36 +01:00
Sönke Ludwig
1385250884 Make the address parameter of send() scoped. 2017-01-22 03:05:46 +01:00
Sönke Ludwig
a1f0cafeb3
Add IOMode parameter for file IO operations. 2017-01-19 00:24:38 +01:00
Sönke Ludwig
8b8169b868 Add EventDriverSockets.setBroadcast. 2017-01-15 21:42:05 +01:00
Sönke Ludwig
116940a5a7 Add EventDriverSockets.getLocalAddress and make parameters scope where possible. 2017-01-15 20:56:06 +01:00
Sönke Ludwig
d8f10972eb Added EventDriverSockets.setKeepAlive. 2017-01-15 17:21:18 +01:00
Sönke Ludwig
aa7b2946f3 Add shared overload of the EventDriver.events property.
This allows accessing the shared "trigger" method from a shared event driver.
2017-01-13 10:20:51 +01:00
Sönke Ludwig
7e9031439c Remove EventDriverFiles.createTemp() and add adopt() instead.
The rationale is to keep the event loop abstraction at a minimal size. createTemp(), to be generally useful, would also require a getFilename(fd) method and possibly more. adopt() on the other hand is frequently useful for wrapping other libraries.
2016-12-10 15:59:03 +01:00
Sönke Ludwig
d181a6730f Add bind address support for outgoing TCP connections. 2016-11-02 20:22:54 +01:00
Sönke Ludwig
88600c5e21 Remove stack optimizations for DNS lookups and streamline send() signature. 2016-10-25 00:12:13 +02:00
Sönke Ludwig
5cca0e863b Avoid default arguments in driver interface and streamline Handle declarations. 2016-10-24 00:11:40 +02:00
Sönke Ludwig
201e4f6077 Make all releaseRef() methods return a Boolean. 2016-10-17 21:53:30 +02:00
Sönke Ludwig
e4e78a860a Implement inotify based directory watcher. 2016-10-17 21:42:09 +02:00
Sönke Ludwig
bdaff3264f Implement listening for signals based on signalfd(). 2016-10-16 21:06:11 +02:00
Sönke Ludwig
0cce1123fc Add getaddrinfo based DNS lookup implementation. 2016-10-16 14:30:52 +02:00
Sönke Ludwig
2518a6c301 Add DNS API and update Libasync stub. 2016-10-14 22:24:31 +02:00
Sönke Ludwig
c6dec730d8 Split up PosixEventDriver into individual classes. 2016-10-12 22:59:15 +02:00
Sönke Ludwig
c4e985b73c Implement UDP socket support. 2016-10-07 12:39:38 +02:00
Sönke Ludwig
2a8c52f347 Add a thread pool based async file implementation. 2016-10-06 22:04:33 +02:00
Sönke Ludwig
49116ede13 Fix doc comment formatting. 2016-10-05 21:09:14 +02:00
Sönke Ludwig
b95c9e5bbc Remove redundancies from API function names. 2016-10-05 14:09:51 +02:00
Sönke Ludwig
80ce62aacb Name handle types, to make compiler error debugging easier. 2016-10-05 13:43:18 +02:00
Sönke Ludwig
4758f1f371 Add all remaining driver API methods. 2016-10-05 13:40:38 +02:00