Johannes Weiss
de2cb8a038
ByteBuffer.set with Collection of UInt8
2017-09-29 15:41:32 +01:00
Johannes Weiss
c1b1d26d07
HTTPRequestDecoder: forward channelReadComplete
2017-09-29 14:41:17 +01:00
Johannes Weiss
66612108f5
fix "var and not modified" compiler warning
2017-09-29 14:29:50 +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
cee2a35a41
give user useful message if IOData unwrap fails
2017-09-25 13:00:09 +01:00
Johannes Weiss
23475c3bf0
trivial: one proper init for Future
2017-09-21 18:30:45 +01:00
Johannes Weiß
8e06697362
fix EventLoop shutdown by introducing shutdownGracefully
2017-09-20 17:15:06 +01:00
Johannes Weiß
1b46d7c4ba
fix ScheduledTask's Comparable implementation
2017-09-20 17:57:31 +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
Johannes Weiss
69765f58d6
refactor already closed errors
2017-09-15 18:18:22 +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
6590bb45a6
Accept handler must always propagate read
2017-09-15 14:26:02 +01:00
Cory Benfield
5d7da679af
Fire channelActive on successful connect
2017-09-15 14:24:48 +01:00
Cory Benfield
bcdbe4bc46
ChannelHandlerContext.connect shouldn't bind
2017-09-15 09:29:59 +01:00
Johannes Weiß
5289094a36
stdlib already has UInt(bigEndian:)
2017-09-13 16:04:07 +01:00
Cory Benfield
0c3d04580b
Correctly try to unwrap InboundIn
2017-09-13 08:26:07 +01:00
Cory Benfield
251e63e82b
Create _EmittingHandler
2017-09-11 16:38:43 +01:00
Norman Maurer
ca7aac3253
Allow to cancel scheduled tasks
2017-08-18 14:07:17 +02:00
Norman Maurer
351d7c40d5
Cleanup code and remove old comments
2017-08-17 19:29:11 +02:00
Norman Maurer
b2405eac44
Add support to schedule tasks on the EventLoop
2017-08-17 13:50:32 +02:00
Norman Maurer
4f91fe3f65
Fix possible infinite recursive loop when deregistering from the Selector throws an error while in close0 method
2017-08-16 19:36:50 +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
1c469541a9
Force unwrap localAddress() as this should never be nil here and so fix the compiler warnings
2017-08-11 20:37: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ß
b58d378869
fix ignoring SIGPIPE
2017-08-09 12:18:21 +01:00
Norman Maurer
16e0ffd9bf
Allow to obtain remote and local address
2017-08-08 15:43:47 +02:00
Johannes Weiß
0684750261
minor fixes
2017-08-08 15:48:56 +01:00
Norman Maurer
f71d82f3f4
Ensure flush and read promise are failed if Channel is already closed
2017-07-31 17:13:41 +02:00
Johannes Weiß
55bed8359b
IPv6 support
2017-07-25 16:55:27 +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
Norman Maurer
9f2aa75f9e
Correctly extract address from enum when bind / connect.
...
Before this change binding a socket failed via:
NIO.IOError(errno: 22, reason: Optional("bind failed: errno(22) Invalid argument")):
This regression was introduced by 9485e583a7f8d6a0e1e36cfff05a8719f7c8c48e.
2017-07-23 14:44:08 +02:00
Johannes Weiß
0213e53f49
description for SocketAddress
2017-07-21 17:18:09 +01:00
Norman Maurer
2cc5151b8c
Add precondition check for invalid writer / read index movement in the public methods.
2017-07-19 09:57:06 +02: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
Johannes Weiß
06ff146839
fix missing autoreleasepool & faster string -> bytes
2017-07-17 17:57:15 +01:00
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