Norman Maurer
7b2af6a03e
Allow to pass the port as argument when starting the servers
2017-07-17 09:58:33 +02:00
Norman Maurer
6a8db51a53
Remove leftover
2017-07-10 21:03:53 +02:00
Norman Maurer
3c604f90dd
Move ByteBuffer.string(...) to ByteBuffer-aux
2017-07-10 15:50:24 +02:00
Norman Maurer
a9c9e0dc15
Http improve no copy
...
* Remove the need of the parseBuffer in the HTTPRequestDecoder and so remove a lot of memory copies.
2017-07-10 13:45:59 +02:00
Norman Maurer
829c0ccb9d
Remove memory copy for each HTTP body part that is received
2017-07-09 13:25:43 +02:00
Norman Maurer
91b652fe8b
Remove weak keywords as we nil out the pipeline reference when remove the context from the pipeline
2017-07-07 17:21:37 +01:00
Norman Maurer
a28b1eb8d2
Tighten up access rights to methods
2017-07-07 17:30:42 +01:00
Norman Maurer
3d67e8da10
Remove duplicate asserts and assert that the Selectable is still open when used with the Selector
2017-07-07 10:52:37 +02:00
Norman Maurer
ff1ab56ab2
Call pendingWrites.failAll(...) in a non delayed fashion to ensure closing of the Channel is reflected directly
2017-07-07 10:26:11 +02:00
Kevin Clark
145e8328c4
Futures init'd with errors/results are already fulfilled
...
* Futures init'd with errors/results are fulfilled
They automatically succeed/fail when new callbacks are added, so
semantically they're already fulfilled, no?
Without this, EventLoop.newSucceedFuture 'leaks' and explodes in the
provided tests.
* Regenerate linux tests
* Add missing generated extension for linux CI
2017-07-07 00:04:45 -07:00
Norman Maurer
ef4cabc4b1
Ensure we not hold a lock while executing the tasks submitted to the EventLoop
2017-07-06 19:53:22 +02:00
Johannes Weiß
7467ab6a02
reduce dynamic type casting and checking
2017-07-06 18:47:15 +01:00
Norman Maurer
9d535bad22
Let writeInbound and writeOutbound signal if something was put in the buffer to consume and update the tests
2017-07-06 14:33:57 +02:00
Norman Maurer
2d235020d0
Add EmbeddedChannel.writeInbound|Outbound methods which make it easier to use EmbbeddedChannel for testing etc
2017-07-06 11:08:48 +02:00
Norman Maurer
c12620e813
Directly use malloc/free when allocate ByteBuffer and also use realloc when change the size of the _Storage
2017-07-05 18:13:55 +02:00
Norman Maurer
980a7f013a
Simplify allocation of http_parser and http_settings
2017-07-05 14:23:58 +02:00
Norman Maurer
6c06390909
Not call discardReadBytes() as this will produce an extra memory copy which is not needed as we rebuild the cumulation buffer anyway on the next message
2017-07-05 10:40:26 +02:00
Norman Maurer
354fd7f623
Use whenComplete(...) when register child channel
2017-07-04 21:04:51 +02:00
Norman Maurer
65fa14dc45
Correctly build HTTPVersion and dont create HTTPHeaders if not needed
2017-07-05 13:57:20 +02:00
Norman Maurer
4b1bc0afa9
EventLoop.submit(...) should use newPromise() for its promise creation to make it easer to implement
2017-07-04 20:10:45 +02:00
Johannes Weiß
c09178ceb2
baby steps towards a type-safe Channel pipeline
2017-06-30 13:04:19 +01:00
Johannes Weiss
15677b9fc2
fix tests
2017-07-04 15:29:41 +01:00
Norman Maurer
614f689e05
Improve the EmbeddedChannel to be able to easily capture inbound and outbound messages
2017-07-04 12:16:00 +02:00
Norman Maurer
c2c5c70610
Correctly handle eventfd_write error and also wrap as syscall
2017-07-04 09:02:49 +02:00
Norman Maurer
4127580f8b
Port MessageToByteEncoder from netty
2017-07-04 08:45:40 +02:00
Norman Maurer
540c74b4ac
Small cleanup
2017-07-04 08:58:45 +02:00
Norman Maurer
c601d7683b
We not depend on the errno module anymore
2017-07-03 19:50:32 +02:00
Norman Maurer
fd936557c4
Move Socket/* into NIO/ for max performance
...
Before:
`Bandwidth per channel: 18870.319⇅ Mbps (2358789.8 kBps)`
After:
`Bandwidth per channel: 21330.617⇅ Mbps (2666327.1 kBps)`
2017-07-03 14:52:09 +02:00
Norman Maurer
904150913d
Add more remove(...) and context(...) methods to ChannelPipeline which allows to modify or retrieve stuff from the pipeline on the fly
2017-07-03 13:35:00 +02:00
Norman Maurer
ba181bfd5c
Detect user wakeup via the EVFILT_USER which is more safe
2017-07-02 19:36:17 +02:00
Norman Maurer
6e55eb0ade
Rename InterestedEvent to IOEvent and reuse it in SelectorEvent to make things more consistent
2017-07-03 13:24:02 +02:00
Norman Maurer
55fad73cd6
Introduce triggerUserOutboundEvent as this is a feature that we noticed is missing from netty
2017-07-03 09:56:16 +02:00
Norman Maurer
f32c0a8b0a
Grow the Selector event array when needed
2017-07-02 14:39:42 +02:00
Norman Maurer
851296002e
Simplify code and some cleanup
2017-07-02 09:12:16 +02:00
Norman Maurer
c7dd20e9ba
Cheaper way of creating fullfilled futures
2017-07-01 20:19:42 +02:00
Norman Maurer
21088d0680
Set maxMessagesPerRead to 4 as default value
2017-07-01 14:55:23 +02:00
Norman Maurer
122360f812
Mark class ass private final
2017-07-01 14:10:36 +02:00
Norman Maurer
29c00b59dd
Reintroduce writeAndFlush as it makes things easier for users
2017-06-29 20:59:27 +02:00
Norman Maurer
815366c37c
Add ByteToMessageDecoder which people can use to easy decode bytes to other messages
2017-06-29 16:52:38 +02:00
Johannes Weiss
2fa81c9df4
make ByteBuffer allocation non-throwing (no reason it threw)
2017-06-29 15:38:02 +01:00
Johannes Weiß
cc9ecf2071
HTTP tests & fixes
2017-06-29 12:20:52 +01:00
Norman Maurer
537cbf224f
Initial version of HTTP server codec based on nodejs http_parser
2017-06-28 15:13:10 +02:00
Norman Maurer
164cf244ac
Swifty bind and connect method signature
2017-06-29 13:08:32 +02:00
Norman Maurer
a9acf251e4
Have read and flush take an optional promise as well.
...
* Make Channel.read(...) take an optional promise so its more inline with the rest of the outbound operations
* Also let flush(...) take an optional promise and remove writeAndFlush(...)
2017-06-28 11:57:17 +02:00
Norman Maurer
06782bc0b3
Introduce ChannelInvoker and let ChannelPipeline and ChannelHandlerContext implement it.
...
- Move ChannelInboundInvoker and ChannelOutboundInvoker to ChannelInvoker
- Add ChannelInvoker protocol which extends ChannelInboundInvoker and ChannelOutboundInvoker
- Let ChannelPipeline and ChannelHandlerContext implement ChannelInvoker
2017-06-28 11:47:47 +02:00
Norman Maurer
ab5297365a
Use whenComplete(...) if interested in error and success case
2017-06-28 08:14:46 +02:00
Johannes Weiß
d85397d689
Endianness is spelt Endianness and not Endianess
...
see https://en.wikipedia.org/wiki/Endianness
2017-06-27 16:47:01 +01:00
Johannes Weiß
d9daac64cc
make registration type-safe
2017-06-27 15:58:22 +01:00
Norman Maurer
f35fb80c7e
Make the promise optional for outbound operations.
...
This change allows the user to use `nil` as promise for outbound operations. This is useful if the user is not really interested in the outcome of the operations as it save extra allocations and so make things faster.
Before:
`Aggregate bandwidth: 10464.620↓, 10465.091↑ Mbps`
After (with using nil as Promise):
`Aggregate bandwidth: 11283.322↓, 11284.157↑ Mbps`
2017-06-27 14:37:24 +02:00
Johannes Weiß
e9de0aca44
retry correctly on EINTR
2017-06-27 16:32:39 +01:00