Commit Graph
29 Commits
Author SHA1 Message Date
Norman Maurer 43303437d1 Declare option label as optional in ClientBootstrap 2017-12-21 22:04:42 +01:00
Norman Maurer 2f527500f5 Rename Bootstrap.option to Bootstrap.channelOption to be more consistent 2017-12-20 15:30:05 +01:00
Johannes Weiss dfd25bf576 refactor Channel initialisation & *Bootstrap docs 2017-12-13 15:42:54 +00:00
Johannes Weiß 33fe401322 rename Future/Promise to EventLoopFuture/EventLoopPromise 2017-11-21 17:41:36 +00:00
Johannes Weiß 6173bee782 Split IOData into NIOAny & IOData (ByteBuffer | FileRegion) 2017-10-25 19:31:27 +01:00
Johannes Weiss 1adb581f59 remove more Foundation imports 2017-10-10 16:25:43 +01:00
Cory Benfield 007feec636 Add Unix domain socket support part 2: Electric Boogaloo
* support UNIX Domain Sockets

* Add test for connect: with UDS path

* Add UDS-special connect method
2017-09-21 15:26:37 +01:00
Cory Benfield 6590bb45a6 Accept handler must always propagate read 2017-09-15 14:26:02 +01:00
Johannes Weiß 55bed8359b IPv6 support 2017-07-25 16:55:27 +01:00
Johannes Weiß 0213e53f49 description for SocketAddress 2017-07-21 17:18:09 +01:00
Johannes Weiß c09178ceb2 baby steps towards a type-safe Channel pipeline 2017-06-30 13:04:19 +01: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 164cf244ac Swifty bind and connect method signature 2017-06-29 13:08:32 +02:00
Norman Maurer cb7850de08 Remove type argument for creating promise / future via EventLoop 2017-06-27 11:09:46 +02:00
Norman Maurer 6ff93721d3 Correctly call fireErrorCaught when in the EventhLoop and bootstrap a server 2017-06-27 08:32:51 +02:00
Norman Maurer d111028ede Make use of Future.whenComplete(...) when we are interested in the failure and success case 2017-06-27 08:31:16 +02:00
Norman Maurer dbb98eb905 Split ChannelHandler to ChannelInboundHandler and ChannelOutboundHandler
The mention change was done for performance reasons as often the user only either implement inbound or outbound operations per handler. The problem before was that we had to traverse the full list all the time even if the user was not really interested in either inbound or outbound events.

With this change we also split the doubly-linked-list into two linked-lists, one for inbound handlers and one for outbound handlers. This way we only need to traverse the handlers that are really interested in th event itself.

To give an idea about the impact of the change in terms of performance, here are some numbers.

Two ChannelInboundHandlers in the ChannelPipeline that do nothing and so just forward the events to the next handler in the pipeline:

Before:

`Bandwidth per channel: 18369.796⇅ Mbps (2296224.5 kBps)`

After:

`Bandwidth per channel: 20043.638⇅ Mbps (2505454.7 kBps)`
2017-06-21 14:35:33 +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 fce361e337 Tighten up visibility to allow the optimizer doing a better job 2017-06-09 11:16:59 +02:00
Norman Maurer aa1f7d04ed Tighten up API and access rights 2017-06-07 11:15:06 +02:00
Johannes Weiß cd4bb67138 make compatible with Swift 4 compiler (in Swift 3 mode) 2017-06-02 18:25:33 +01:00
Norman Maurer 29b4ad373b Correctly distribute work across EVentLoops 2017-06-01 17:59:50 +02:00
Norman Maurer d5ac9b8b66 Add ClientBootstrap and so support for client side channels as well 2017-05-30 19:10:45 +02:00
Norman Maurer c8eb940aa7 Add support for running multiple EventLoops 2017-05-30 14:09:02 +02:00
Norman Maurer db2002840d Add Channel.connect(...) and needed methods to Socket to support connect. This will allow us to support client and server easily in the future. 2017-05-24 22:13:17 +02:00
Norman Maurer 3be0f15063 Simplify and tighten up access rights 2017-05-24 20:32:16 +02:00
Norman Maurer c1570dbfea Introduce ServerBootstrap which replaces NIOServer 2017-05-23 19:14:44 +02:00