Johannes Weiss
e217dea875
fix EmbeddedChannel: created more than one EmbeddedEventLoop
2018-01-04 18:08:07 +00:00
Norman Maurer
8efd6438f2
Replace usage or Array with CircularBuffer in EmbeddedEventLoop.
2017-12-14 20:11:58 +00:00
Norman Maurer
e1efe8786f
Declare EmbeddedChannel as public so people can acutally use it
2017-12-15 09:10:26 +00:00
Cory Benfield
2373863f54
No fatal error on unexpected non-ciphertext data
2017-12-12 11:31:05 +00:00
Cory Benfield
99188f3a99
Don't lose close promises
2017-11-21 19:00:36 +00:00
Johannes Weiß
33fe401322
rename Future/Promise to EventLoopFuture/EventLoopPromise
2017-11-21 17:41:36 +00:00
Max Moiseev
01b28a3f6d
Simplify logic in guards (replace some with ifs instead)
2017-11-16 17:29:35 -08:00
Cory Benfield
8d2f13be68
Add parent property
2017-11-13 10:11:52 +00:00
Johannes Weiß
6173bee782
Split IOData into NIOAny & IOData (ByteBuffer | FileRegion)
2017-10-25 19:31:27 +01:00
Cory Benfield
25d57e8fab
Add Channel.isActive
2017-10-19 16:44:42 -07:00
Cory Benfield
fb9e14b4d4
Don't lose promises on synchronous close.
2017-10-18 16:53:45 -07:00
Cory Benfield
8094e43582
Prevent multiple closure of the EmbeddedChannel.
2017-10-10 09:21:46 -07:00
Johannes Weiss
1adb581f59
remove more Foundation imports
2017-10-10 16:25:43 +01:00
Johannes Weiß
8e06697362
fix EventLoop shutdown by introducing shutdownGracefully
2017-09-20 17:15:06 +01:00
Johannes Weiss
6721d46b9d
make scheduling tasks on the EventLoop compatible with the tail call syntax
2017-09-18 16:24:08 +01:00
Johannes Weiss
da905d17f8
channelInactive should fire before channelUnregistered
2017-09-18 14:42:35 +01:00
Johannes Weiss
69765f58d6
refactor already closed errors
2017-09-15 18:18:22 +01:00
Norman Maurer
ca7aac3253
Allow to cancel scheduled tasks
2017-08-18 14:07:17 +02:00
Norman Maurer
b2405eac44
Add support to schedule tasks on the EventLoop
2017-08-17 13:50:32 +02:00
Norman Maurer
f71d82f3f4
Ensure flush and read promise are failed if Channel is already closed
2017-07-31 17:13:41 +02: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
Johannes Weiß
c09178ceb2
baby steps towards a type-safe Channel pipeline
2017-06-30 13:04:19 +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
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
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
c7dd20e9ba
Cheaper way of creating fullfilled futures
2017-07-01 20:19:42 +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
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
Norman Maurer
cb7850de08
Remove type argument for creating promise / future via EventLoop
2017-06-27 11:09:46 +02:00
Norman Maurer
bea94aa2aa
Not allow to add a ChannelHandler to the ChannelPipeline after the Channel was closed.
...
We should not allow to add a ChannelHandler to the ChannelPipeline after the Channel was closed, and so all handlers of the pipeline removed.
2017-06-26 08:57:45 +02:00
Norman Maurer
f92c0a09b8
Make naming in ChannelCore more consistent and remove implementation detail from protocol
2017-06-22 17:25:11 +02:00
Norman Maurer
57cd379950
More consistent handling of writable state changes, so it matches netty
2017-06-19 15:05:29 +02:00
Johannes Weiß
b73bfdab70
remove some existentials by specialising the data type (IOData)
2017-06-15 19:43:49 +01:00
Norman Maurer
58d0883b2d
Fork Future-Swift and adjust it to ensure callback execution is always done on the EventLoop.
...
- Also remove all methods that use Dispatch for now as we not need these
- Ensure we will detect if the user calls a blocking method while on the EventLoop and crash to guard against deadlock
2017-06-12 13:44:10 +02:00
Norman Maurer
c6685c3e7c
Use types to allow the compile to specialize the methods
2017-06-09 15:47:10 +02:00
Norman Maurer
aa1f7d04ed
Tighten up API and access rights
2017-06-07 11:15:06 +02:00
Kevin Clark
329b474f45
Initial impl of EmbeddedChannel
2017-06-05 16:59:51 -07:00