Cory Benfield
c2f461e4b7
[OpenSSLHandler] Flush less frequently for outgoing application data.
2017-10-04 17:29:38 +01:00
Cory Benfield
55ae8a8606
Make MarkedCircularBuffer public
2017-10-02 11:36:29 +01:00
Johannes Weiss
de2cb8a038
ByteBuffer.set with Collection of UInt8
2017-09-29 15:41:32 +01:00
Johannes Weiss
b735ddf306
HTTPServerClientTest: depend on channelReadComplete working
2017-09-29 14:58:33 +01:00
Cory Benfield
e2722732b7
Allow write during channelActive.
...
* Test that we can write during channelActive
* Flush after connect complete
2017-09-27 16:46:15 +01:00
Cory Benfield
35dd5fce48
Flush immediately without pending writes.
...
* Add failing test for flush on empty
* Succeed flushes immediately when possible
2017-09-27 16:24:43 +01:00
Cory Benfield
bdce6b39ca
Better handle multiple calls to close() in TLS.
2017-09-27 11:16:58 +01:00
Cory Benfield
8a6d9c825c
OpenSSL-based TLS support
...
Add initial OpenSSL support to NIO.
2017-09-26 14:47:41 +01:00
Johannes Weiss
a73d46f218
HTTP/1.1 Chunked Encoding
...
* HTTP/1.1 Chunked Encoding
* fix MarkedCircularBuffer: if not marked do not try to move mark when removing first
* fix HTTPRequestDecoder: dispatch callouts after parsing is complete
* fix HTTPTest: feed pipeline the inbound data correctly
2017-09-25 15:33:02 +01:00
Johannes Weiss
bf66e8f1b4
more forgotten tests added
2017-09-25 13:00:35 +01:00
Johannes Weiß
8e06697362
fix EventLoop shutdown by introducing shutdownGracefully
2017-09-20 17:15:06 +01:00
Johannes Weiß
eff809b88d
add forgotten Linux tests
2017-09-20 17:43:16 +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
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 Weiß
3ea35268d4
fully close Channel before firing channelInactive/Unregistered
2017-09-15 18:29:20 +01:00
Cory Benfield
4c37eee3f8
Pipelines that write before they read must remain readable.
...
* Test that we can write and then read
* Correctly unregister writability
2017-09-15 16:41:52 +01:00
Cory Benfield
537a555877
Test that connect fires channelActive
2017-09-15 10:00:31 +01:00
Cory Benfield
bcdbe4bc46
ChannelHandlerContext.connect shouldn't bind
2017-09-15 09:29:59 +01:00
Cory Benfield
0c3d04580b
Correctly try to unwrap InboundIn
2017-09-13 08:26:07 +01:00
Cory Benfield
6ddd130890
Add channel handler tests
2017-09-11 14:31:47 +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
1619c3d7c8
Add support for sendFile by allow to write a FileRegion.
2017-08-11 20:32:04 +02:00
Norman Maurer
67e2359a8f
Use a random port for testing to ensure we not run into any conflicts
2017-08-12 10:05:43 +02:00
Johannes Weiß
f42420f0d2
circular buffer for pending writes
2017-08-11 17:05:58 +01:00
Norman Maurer
24ce812c31
Ensure swift-nio compiles on latest swift 4.0 snapshot
2017-08-08 13:25:57 +02:00
Norman Maurer
a708c33008
Fix Channel.connect(...) and add unit test that shows using swift-nio to build clients / servers work
2017-08-08 13:52:40 +02:00
Johannes Weiß
0684750261
minor fixes
2017-08-08 15:48:56 +01:00
Kevin Clark
78ba7a819e
Make HTTPHeaders iterate with originalcase'd names
...
* Make HTTPHeaders iterate with originalcase'd names
Interface change as a consequence of this: now iterating headers
produces (name, value) tuples rather than (name, [values]).
* Add linux test wrapper
* Add case insensitive lookup test
* Update generate test headers
* Make HTTPHeadersIterator private
2017-07-24 12:55:12 -07:00
Johannes Weiß
0213e53f49
description for SocketAddress
2017-07-21 17:18:09 +01:00
Kevin Clark
ed98bffe28
Renames and cleanup
...
* Massage HTTPHeaders
Simple had it's own version that was the same aside from a couple of
minor tweaks.
* Default initializer for HTTPHeaders
* Rename HTTPRequest -> HTTPRequestPart
* HTTPResponse -> HTTPResponsePart
* Add HTTPVersion(major:,minor:)
* Allow access to HTTPVersion.major/minor
* Comments on HTTP response codes
* Fix tests (needed rename applied)
2017-07-18 10:38:23 -07:00
Norman Maurer
3c604f90dd
Move ByteBuffer.string(...) to ByteBuffer-aux
2017-07-10 15:50:24 +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
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
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
4127580f8b
Port MessageToByteEncoder from netty
2017-07-04 08:45:40 +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
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ß
d85397d689
Endianness is spelt Endianness and not Endianess
...
see https://en.wikipedia.org/wiki/Endianness
2017-06-27 16:47:01 +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
07a5f8112e
Fix test that was racy before and so failed on the CI
2017-06-26 21:09:05 +02:00
Norman Maurer
661f8f0c39
Regenerate for linux to run the new test
2017-06-26 19:55:50 +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