Commit graph

29 commits

Author SHA1 Message Date
Sönke Ludwig
964d72f3b5 Fix handling of scoped callback parameters in eventcore callbacks. 2017-01-16 00:20:35 +01:00
Sönke Ludwig
32d360baac Add callback based result retrieval for asyncAwaitAny.
This can be used to safely retrieve scoped data.
2017-01-15 23:55:37 +01:00
Sönke Ludwig
f015662a94 TCPConnection and async improvements.
- asyncAwaitAny now takes the callback type, so that parameter storage classes are handled correctly
- Implement TCPConnection.remoteAddress/localAddress
- Implement TCPConnection.tcpNoDelay, keepAlive and readTimeout
- Implement timeout handling for TCPConnection.waitForData
2017-01-15 20:59:36 +01:00
Sönke Ludwig
35a94412d0 Make FileStream small enough to fit into an InterfaceProxy. 2016-12-26 21:28:36 +01:00
Sönke Ludwig
09d9ea47bf Fix InterfaceProxy to not explicitly destroy contained class instances.
This lead to double-destruction in case an InterfaceProxy was copied.
2016-12-10 14:21:57 +01:00
Sönke Ludwig
81b7010724 Fix some safety annotation issues. 2016-11-10 12:19:39 +01:00
Sönke Ludwig
ccbd6a063f Fix FreeListRef related issues. 2016-11-10 12:01:35 +01:00
Sönke Ludwig
18a5afddc4 Fix test compilation on DMD 2.071.x. 2016-11-08 15:41:59 +01:00
Sönke Ludwig
f74c30a9f3 Use std.experimental.allocator and remove the custom allocator module. 2016-11-08 15:32:25 +01:00
Sönke Ludwig
55a06c30f3 Add missing interface proxy module. 2016-11-08 14:48:38 +01:00
Sönke Ludwig
eb0697d6e4 Let types that implicitly convert to interface pass interface check.
"null" in particular is now considered to pass the interface conformance check.
2016-11-05 01:42:20 +01:00
Sönke Ludwig
9cfb702f0b Fix deprecation warnings. 2016-11-05 01:41:15 +01:00
Sönke Ludwig
a8cd1be065 More safe-ty. 2016-11-05 01:06:11 +01:00
Sönke Ludwig
9df6874a55 Annotate FreeListRef safe as far as possible. 2016-11-05 00:58:51 +01:00
Sönke Ludwig
b96c20ef54 Fix interface conformance checks.
- Now includes final interface methods
- Properly checks attributes
2016-11-02 20:59:19 +01:00
Sönke Ludwig
616130cef1 Safe-ify internal code. 2016-11-02 20:53:30 +01:00
Sönke Ludwig
0ee42c4243 Add vibe.d 0.7.x compatible stream definitions.
In contrast to 0.7.x, streams can now be either of class, struct or interface type.
2016-10-26 13:11:28 +02:00
Sönke Ludwig
4db9b3f100 Implement DNS lookups and partially implement UDP. 2016-10-25 00:27:51 +02:00
Sönke Ludwig
c08f101549 Update for eventcore 0.5.0 and the latest DMD beta. 2016-10-24 08:22:49 +02:00
Sönke Ludwig
e294d24a4b Update for latest eventcore version. 2016-10-05 14:40:29 +02:00
Sönke Ludwig
1c2850f99f Make all low-level asnyc log messages opt-in. 2016-10-04 17:51:24 +02:00
Sönke Ludwig
ff8882976d Fix BatchBuffer.read. 2016-10-04 17:50:13 +02:00
Sönke Ludwig
1005f5c674 Fix all ManualEvent related tests. 2016-06-17 22:33:04 +02:00
Sönke Ludwig
a74a89cab7 Fix scope issues in asyncAwait. 2016-06-15 18:21:04 +02:00
Sönke Ludwig
48131ce7b8 Implement generic asyncAwaitAny.
This enables waiting for multiple events at the same time. Generic timeout functionality is now also implemented.
2016-06-14 09:26:12 +02:00
Sönke Ludwig
3b0e4e0452 Big refactoring step.
- Moves a lot of stuff from vibe.core.core to vibe.core.task
- Introduces TaskScheduler to unify the scheduling process
- Refines how tasks are scheduled and processed (can push to the front of the task queue and uses a marker task to keep track of the spot up to which to process)
- Start to add proper support for task interrupts and timeouts by properly cancelling in-flight async operations
- Work on ManualEvent - still not functional for the shared case
- Implement proper IP address parsing in NetworkAddress
2016-06-14 08:01:03 +02:00
Sönke Ludwig
ba48a6f43a Use BatchBuffer instead of FixedRingBuffer for TCP read. 2016-04-10 17:17:15 +02:00
Sönke Ludwig
27e0019e44 Fix regression in FreeListRef where no memory was allocated for the ref count. Fixes #1432.
Commit 6be5471 switched FreeListRef to use FreeListObjectAlloc underneath, but didn't accound for the extra memory that is needed to store the reference count directly after the object payload. The possible implications of this are memory corruption and memory leaks, although with the predefined allocator setip, this will only happen to types with a POT size or slightly less.

This commit adds an "EXTRA" template type parameter to FreeListObjectAlloc that is used to determine the additional amount of allocated memory, which is set to "int" in the case of FreeListRef.

(cherry picked from commit d78a9ce89b845e4f89a84bd70bbd48c7595463d4)

(cherry picked from commit 613d15926e241c03e75bb2d237d39ba712613aeb)
2016-04-10 14:40:39 +02:00
Sönke Ludwig
7e2d1dd038 Initial commit.
The library is able to support simple TCP servers in the current state. The API is still mostly compatible with mainline vibe.d, but the driver systen has been replaced by the eventcore library and sockets/files/timers/... are now structs with automatic reference counting instead of GC collected classes. The stream interfaces have been removed for now.
2016-03-01 20:30:42 +01:00