Commit Graph

107 Commits

Author SHA1 Message Date
Eugen Wissner f9023cf0ab Let Transport extend IOWatcher 2017-02-09 21:40:52 +01:00
Eugen Wissner 0e91ea6786 Pass client socket directly to the IOWatcher 2017-02-09 21:40:52 +01:00
Eugen Wissner 63c6226a2a Implement protocol property for IOCPTransport 2017-02-08 21:21:12 +01:00
Eugen Wissner 48a49c2a2d Add protocol property to the transport
Transport should be protocol aware because it should be possible to
switch the protocol if the operation is supported, for example for upgrading
HTTP to web sockets or HTTP 1.1 to HTTP/2.
2017-02-08 20:04:05 +01:00
Eugen Wissner 43c28b749d Rename async.loop.Loop.done_ to done
Since there is no property with a conflicting name.
2017-02-04 14:55:52 +01:00
Eugen Wissner 241767df13 Move DefaultAllocator mixin to tanya.memory
Since it depends on defaultAllocator property defined in the module.
2017-02-03 13:07:40 +01:00
Eugen Wissner b2baba9237 SList: Add length and opEquals 2017-01-25 19:41:05 +01:00
Eugen Wissner 3e36ec0984 Add support for dmd 2.070.2 2017-01-25 07:24:19 +01:00
Eugen Wissner 5be89e4858 Add support for dmd 2.073.0 2017-01-24 16:15:14 +01:00
Eugen Wissner a48d9cb739 Add range support for SList 2017-01-24 08:20:07 +01:00
Eugen Wissner a7206cbd02 Fix #4 2017-01-22 10:48:34 +01:00
Eugen Wissner 1450a6adfe Vector.insertBack: Accept by value and by ref 2017-01-20 05:40:28 +01:00
Eugen Wissner 5fa9bd7b49 Rename Allocator.expand to reallocateInPlace
Rename and extend Allocator.expand to reallocateInPlace. The problem is
that realloc for example doesn't guarante that the shrinking of the
memory block won't cause address change. So not only expanding should
have "in place" version, but the shrinking as well.
2017-01-18 09:33:39 +01:00
Eugen Wissner c7eb233fc7 Make passed length parameter const 2017-01-16 10:56:45 +01:00
Eugen Wissner 20c8b659d1 Remove mutation methods from vector range
in favor of std.algorithm.mutation.
2017-01-16 09:02:00 +01:00
Eugen Wissner 4ea9c2b740 Vector: Reuse available methods 2017-01-15 08:38:19 +01:00
Eugen Wissner 48205b2fc9 MmapPool: Add invariant
Add invariant to ensure blocks are linked correctly since this error
appeared several times.
2017-01-14 21:48:21 +01:00
Eugen Wissner f5fe7bec4a Queue optimization. Fix #5 2017-01-14 21:27:07 +01:00
Eugen Wissner c567b88d5d MmapPool: Fix expand block moving.
D dereferences the pointer wrong because of missing difference between .
and -> operators, if trying to write a block over another
block. So use memmove first to move the memory and then update the fields
that should be changed (only size).
2017-01-14 20:39:33 +01:00
Eugen Wissner fe884541fc Rename Vector.data to Vector.get 2017-01-13 15:23:42 +01:00
Eugen Wissner 8973bdb2af Fix if EPOLLIN and EPOLLOUT come together 2017-01-13 10:20:11 +01:00
Eugen Wissner 4c4e65b373 MmapPool: (p[] is null) != (p[].ptr is null) 2017-01-12 19:47:07 +01:00
Eugen Wissner 7bed7f039f Remove default parameter value from Protocol.disconnected 2017-01-12 18:07:39 +01:00
Eugen Wissner 8ddea0aa46 Loop.maxEvents is const, not inout const 2017-01-12 10:43:02 +01:00
Eugen Wissner cb6cc65113 async: Switch to the internal use of the vector instead of built-in arrays 2017-01-12 10:17:12 +01:00
Eugen Wissner 4de42ca227 Use only one queue for the async events 2017-01-12 09:09:33 +01:00
Eugen Wissner ab930657b6 Queue: Leave only enqueue/dequeue/empty/opApply 2017-01-11 18:24:50 +01:00
Eugen Wissner 291920b479 Vector constructors for initializing from a vector 2017-01-10 06:34:53 +01:00
Eugen Wissner 999c9bdb0f Vector: remove core.stdc.string import 2017-01-09 19:52:39 +01:00
Eugen Wissner 405b6d9f9f Accept only ranges for slicing assignment 2017-01-09 19:32:51 +01:00
Eugen Wissner 87b74b2542 Fix reallocating the vector 2017-01-09 17:03:09 +01:00
Eugen Wissner d6514cb515 Fix Ddoc 2017-01-07 17:53:57 +01:00
Eugen Wissner 976eb4bfbc Add downloads button 2017-01-07 15:25:05 +01:00
Eugen Wissner fb843e3473 Fix #3 2017-01-07 09:30:42 +01:00
Eugen Wissner f3d48234c0 MmapPool: add expand and empty methods. 2017-01-06 23:12:19 +01:00
Eugen Wissner 254b881da6 Fix block size calculation 2017-01-06 11:56:54 +01:00
Eugen Wissner 8e0b742748 MmapPool: Merge blocks on deallocation if possible 2017-01-05 14:25:54 +01:00
Eugen Wissner a35e04c049 Don't throw in the allocator, return null 2017-01-05 07:42:23 +01:00
Eugen Wissner 4271c8583e Remove static constructor from the MmapPool 2017-01-05 07:35:29 +01:00
Eugen Wissner e27d0fe58c Fix Vector.remove not destroying from the end copied elements 2017-01-04 20:37:55 +01:00
Eugen Wissner 67952dabdb Implement Vector.remove 2017-01-03 13:21:19 +01:00
Eugen Wissner b8d5d4c2bd Fix template condition for Vector.insertBack 2017-01-03 10:03:28 +01:00
Eugen Wissner b6413823cd Add opEquals for all combinations of vector ranges 2017-01-02 17:33:01 +01:00
Eugen Wissner 48e355b87f Vector: allow insert multiple items in insertBack 2017-01-02 12:47:41 +01:00
Eugen Wissner b3f4ea572e Vector: Use opEquals if defined to compare items 2017-01-02 06:59:05 +01:00
Eugen Wissner c73e704421 Fix constness of Vector range, optimizing 2017-01-01 02:51:49 +01:00
Eugen Wissner 0561e96f21 Fix build with 2.071.2 2016-12-28 07:57:36 +01:00
Eugen Wissner 86d87430da Fix socket build on Windows 2016-12-25 12:54:04 +01:00
Eugen Wissner 0156c5a883 Don't allocate watcher queue on the heap 2016-12-25 00:54:05 +01:00
Eugen Wissner c966b42ac3 Fix FreeBSD build 2016-12-24 22:25:34 +01:00