Commit Graph
2945 Commits
Author SHA1 Message Date
Max (Swift) Moiseev 973a96004d Get rid of free functions
* Lift the EventLoopFuture.== into the type extension and add the Equatable conformance

* Get rid of the only public free function systemCoreCount
2018-01-30 10:41:44 -08:00
Cory Benfield 69a9b378a4 Add AddressedEnvelope type 2018-01-30 16:09:10 +00:00
Johannes Weiss 945f352e2d advertise documentation 2018-01-30 12:56:23 +00:00
Johannes Weiß b2c63337d9 prefix http parser to prevent symbol clashes 2018-01-30 11:14:03 +00:00
Johannes Weiß 606df54ee1 don't try generating NIOOpenSSL docs in main repo 2018-01-30 12:15:07 +00:00
Johannes Weiss eab7d314f3 make Channel non optional in ChannelHandlerContext 2018-01-30 12:03:51 +00:00
Norman Maurer 786c2ed32e Fix promise passing 2018-01-25 15:47:42 +01:00
Norman Maurer 3d8965b114 Share promise notify code via an internal function 2018-01-18 18:52:40 +00:00
Johannes Weiss af4dabb0fa rename the Future's functor map function to map 2018-01-30 08:25:20 +00:00
Norman Maurer 46ac01f517 Use AdaptiveRecvBufferAllocator in the example as this is what users usually should do 2018-01-29 15:01:30 +01:00
Tom Doron 84a4f2df21 make docs script more resilient
motivation: doc generation fails when no changes detected

changes: make git commit/push conditional on changes
2018-01-26 17:18:18 -08:00
Johannes Weiss b3799b9403 take OpenSSL support out of tree 2018-01-26 09:50:38 +00:00
Johannes Weiss 0853dc3911 stop atomics from allocating on every operation 2018-01-26 09:11:59 +00:00
Cory Benfield 1fffa95ad1 Make ChannelCore writes use NIOAny 2018-01-25 12:12:02 +00:00
Johannes Weiss 4a2425f5b7 promise leak debugging 2018-01-24 08:21:35 +00:00
Cory Benfield d0a7b539a8 Remove unnecessary parent method 2018-01-23 16:48:37 +00:00
Johannes Weiß 5e9eeb89d7 docs: nicer module switcher 2018-01-23 14:13:05 +00:00
Cory Benfield fb5ccef63b Further channel refactoring.
* Move current override methods to top

* Move writing implementation to SocketChannel

* More documentation
2018-01-23 15:08:50 +00:00
Cory Benfield 66462dd2ce Split Channel.swift up a bit 2018-01-23 09:31:08 +00:00
Johannes Weiss 88d57f16d2 fix static assert compilation warning 2018-01-22 16:26:17 +00:00
Cory Benfield 92634a68fb Add utility for detecting core count. 2018-01-22 12:05:43 +00:00
Cory Benfield 34cc404142 Refactor internal storage model for SocketAddress 2018-01-22 12:07:40 +00:00
Tom Doron 115169e59f doc generation fixes
motivation: make doc generation work in ci

changes:
* update to non-root mode
* use keyserver.ubuntu.com with port 80
* increase timeout
2018-01-19 20:24:49 +00:00
Cory Benfield 9908b391db Prevent SniHandler wrongly calculating packet length. 2018-01-19 16:39:46 +00:00
Johannes Weiss 7d5109a673 no auto headers for GET 2018-01-19 15:46:52 +00:00
Johannes Weiss 24abe7fe19 merge (& fix) the inbound and outbound channel pipelines 2018-01-19 14:50:37 +00:00
Johannes Weiß 05a58e5a58 readFromSocket: be slightly more clever about buffer.clear() 2018-01-18 15:11:51 +00:00
Johannes Weiss db28cf4452 don't pretend user events are typed & remove tryUnwrap for in/outbound data 2018-01-19 14:12:57 +00:00
Norman Maurer 4d8cf1ff22 Add support for closing only the output / input side of the Channel. 2017-12-28 13:40:31 +01:00
Tom Doron cf790be04f doc generation
motivation: publish api docs via gh-pages

changes:
* update generate_docs script to install required dependencies, perform sourcekitten index and commit the docs when running in CI
* create a rio pipeline to run docs generation script
2018-01-18 19:21:54 +00:00
Cory Benfield 1535c2f5fc Add IP string parsing 2018-01-18 18:07:50 +00:00
Cory Benfield 1e763d419d Cleanups for Fuzzing 2018-01-18 14:48:49 +00:00
Johannes Weiß 6b4219d194 fix build on Darwin 2018-01-17 18:44:52 +00:00
Norman Maurer 2e2a82b27e Try to drain inbound data on write error.
Motivation:

To ensure we not leave any unread data on the socket we should try to read one last time (if autoread is enabled).

Modifications:

- Depending on if autoread is enabled or not we will try to read one more time
- Guard against re-entry of flushNow0()
- Correctly handle SIGPIPE in all cases
- Add testcase

Result:

Drain data from socket on write error if needed.
2017-12-27 08:10:53 +01:00
Cory Benfield a2bb047224 Add bindings for {send,recv}mmsg. 2018-01-17 09:18:28 +00:00
Johannes Weiss 8b74d21562 more robust tempfiles for SSL trust bundle 2018-01-10 17:19:02 +00:00
Johannes Weiss 7996d12bed make NIO cross-compilable 2018-01-10 11:16:07 +00:00
Johannes Weiß c79c5ba364 re-export Darwin/Glibc and reduce number of #if os(...) 2018-01-09 15:08:17 +00:00
Johannes Weiss b9a982bfa1 improve robustness of SSL/TLS tests regarding errors thrown
previously on some errors we'd leak a promise without a good way to
debug. This should shed some light on that.
2018-01-09 14:27:32 +00:00
Cory Benfield 9fd4006c93 Add explicit time control to EmbeddedEventLoop 2018-01-08 17:59:18 +00:00
Johannes Weiss 64ef7728f9 finish renaming ByteBuffer getters to getType 2018-01-09 09:32:39 +00:00
Johannes Weiß 5f21764710 fix compiler warning & typo 2018-01-08 16:48:44 +00:00
Cory Benfield 8ee527ac52 Simplify running code 2018-01-08 16:39:54 +00:00
Johannes Weiss 34e0b1ac0a sanitise time interval (aka TimeAmount) APIs 2018-01-08 15:41:40 +00:00
Johannes Weiss 9a5390495e improve channel pipeline
We now use two (doubly) linked lists (inbound & outbound) for the
ChannelPipeline. Previously we used two singly linked lists and an
array. That would give us the worst of the two worlds: Linear time
modifications and complicated code.
2018-01-05 18:17:34 +00:00
Norman Maurer 3e7fe77202 Use switch statement when try to unwrap / force unwrap 2017-12-28 14:57:23 +01:00
Johannes Weiss 8674154403 remove pretty much all try!s from the tests 2018-01-05 16:22:38 +00:00
Johannes Weiss d2b671da66 make HTTPServerClientTests more robust 2018-01-05 15:19:22 +00:00
Johannes Weiss 62b4acaedf ByteBuffer.clear: Prevent copying bytes if allocation is necessary 2018-01-05 15:01:48 +00:00
Johannes Weiss e217dea875 fix EmbeddedChannel: created more than one EmbeddedEventLoop 2018-01-04 18:08:07 +00:00