Commit Graph

5412 Commits

Author SHA1 Message Date
Norman Maurer
fc805a0787 CompositeByteBuf.isDirect() should return true if its only backed by direct buffers 2013-09-26 20:50:59 +02:00
Norman Maurer
213d195909 [#1865] Only use internalNioBuffer when one of the read* or write* methods are used. This is neccessary to prevent races as those can happen when a slice or duplicate is shared between different Channels
that are not assigned to the same EventLoop. In general get* operations should always be safe to be used from different Threads.

This aslo include unit tests that show the issue
2013-09-25 17:18:47 +02:00
Norman Maurer
52660dfcfa Propagate channelWritabilityChanged() through the pipeline after flushing. Related to [#1861] 2013-09-24 14:19:53 +02:00
Norman Maurer
f35ba4f80f Correctly handle automatically suspend/resume in ChunkedWriteHandler. Related to [#1861]
The old implementation was broken and could lead to pending message never be picked up again until the user either explicit called flush or
resumeTransfer().
2013-09-24 14:19:38 +02:00
Norman Maurer
cd5f9a2212 Introduce a new ChannelOption called DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION. Related to [#1830]
This ChannelOption allows to tell the DatagramChannel implementation to be active as soon as they are registrated to their EventLoop. This can be used to make it possible to write to a not bound DatagramChannel.
The ChannelOption is marked as @deprecated as I'm looking for a better solution in master which breaks default behaviour with 4.0 branch.
2013-09-24 11:51:54 +02:00
Norman Maurer
5aa2b7e9f7 [#1855] Try to calculate the correct amount of written bytes to update the ChannelProgressiveFuture 2013-09-24 07:50:02 +02:00
Arron Norwell
5a0d7fe19a HttpRequestEncoder should append '/' to absolute path requests only when needed 2013-09-22 13:57:10 +02:00
Norman Maurer
1c7e107bef [#1851] EmptyByteBuf.isWritable(..) and isReadable(...) should not throw IndexOutOfBoundsException 2013-09-21 20:40:08 +02:00
Sasha Zverev
71c062167d Slip in DefaultOioSocketChannelConfig (setAllowHalfClosure used to ignore argument) 2013-09-21 20:14:12 +02:00
Norman Maurer
a855f19ad6 [#1853] Optimize gathering writes for CompositeByteBuf that are only backed by one ByteBuffer 2013-09-19 07:29:21 +02:00
Norman Maurer
0e1dcb91ff [#1852] Fix bug in UnpooledDirectByteBuf.nioBuffer(...) implementation 2013-09-18 20:48:40 +02:00
Norman Maurer
3cfcf09af8 More efficient handling of incomplete writes.
The problem with the old way was that we always set the OP_WRITE when the buffer could not be written
until the write-spin-count was reached. This means that in some cases the channel was still be writable
but we just was not able to write out the data quick enough. For this cases we should better break out the
write loop and schedule a write to be picked up later in the EventLoop, when other tasks was executed.
The OP_WRITE will only be set if a write actual returned 0 which means there is no more room for writing data
and this we need to wait for the os to notify us.
2013-09-17 07:01:05 +02:00
Norman Maurer
8dc57f6933 [#1836] Add comment to explain why read is triggered 2013-09-17 06:58:23 +02:00
Greg Soltis
335f3807a5 Fix nioBuffer implementation for CompositeByteBuf 2013-09-16 06:57:32 +02:00
Norman Maurer
c0b9ef9386 [#1833] Add testcase for fix 2013-09-14 11:53:30 +02:00
Phillip Schichtel
d885394b8a [#1833] Replace ; with & only in the QueryString and not the whole URI 2013-09-14 11:52:39 +02:00
Trustin Lee
4aab9e0773 No need to use an unreleasable buffer - just wrap an array 2013-09-13 14:09:51 -07:00
Norman Maurer
87a6a68059 [#1830] Add testcase for write to not bound DatagramChannel impls and revert change in OIO as it breaks things as the udnerlying socket lazy binds 2013-09-12 09:29:40 +02:00
Norman Maurer
50106f3d41 Make DatagramChannel impls .isActive() return true when the underlying Channel is open. This also fixes [#1830] 2013-09-11 20:38:04 +02:00
Norman Maurer
98633e0aee Allow to only register a Channel via AbstractBootstrap and bind/connect it later. Related to [#1829] 2013-09-11 20:37:53 +02:00
Norman Maurer
343ecaa111 Add test to show that writing a CompositeByteBuf when SslHandler is in use works. Related to [#1825] 2013-09-11 07:29:02 +02:00
Norman Maurer
16cf807fc5 Set memory for compiler as otherwise it sometimes fails here 2013-09-10 18:39:02 +02:00
Norman Maurer
3b44c602db [#1821] Fix IndexOutOfBoundsException which was thrown if the last component was removed but other components was left 2013-09-10 18:38:52 +02:00
Norman Maurer
12f325767c [#1819] Remove HTTP compressor and decompressor from the pipeline after websockets handshake completes 2013-09-09 11:55:25 +02:00
Norman Maurer
c89f1b0a03 [#1818] Pass through message as they are when no compression is needed 2013-09-09 11:43:45 +02:00
Norman Maurer
198dde33b3 Optimize the http-codec to be much faster then before.
This includes the following changes:
  * Rewrite HttpObjectDecoder to use ByteToMessageDecoder
  * Optimize parsing of the header
  * Allow to disable the header validation for performance reason
  * Not need to validate kwown header names and values
  * Minimize access of ThreadLocals
  * Optimize parsing of initial line
2013-09-05 20:21:04 +02:00
Norman Maurer
6716dca17a Use a Thread-local based direct buffer pool if non pooled allocator is used 2013-09-05 11:58:03 +02:00
Trustin Lee
95576d6559 Ensure operationProgressed is invoked even on completion
- Fixes #1809
2013-09-05 18:36:48 +09:00
Norman Maurer
e46ba9e8de Move encode of chunked content to an extra method, this allows for inline. Related to #1812
encode of chunked content is not the most common pattern so moving it to an extra method makes it possible to inline the rest as it is a smaller method now.
2013-09-05 10:15:51 +02:00
Norman Maurer
9331226406 Split up the nioBuffers() method to allow for inline. Related to #1812
This move less common method patterns to extra methods and so make the nioBuffers() method with most common pattern (backed by one ByteBuffer) small enough for inlining.
2013-09-05 09:24:27 +02:00
Norman Maurer
d75897bb2d [#1805] Fix example in javadocs of SimpleChannelInboundHandler 2013-09-03 20:31:42 +02:00
Norman Maurer
a52bbd20f4 Make sure only direct ByteBuffer are passed to the underlying jdk Channel.
This is needed because of otherwise the JDK itself will do an extra ByteBuffer copy with it's own pool implementation. Even worth it will be done
multiple times if the ByteBuffer is always only partial written. With this change the copy is done inside of netty using it's own allocator and
only be done one time in all cases.
2013-09-02 20:17:34 +02:00
Norman Maurer
6f79291d5b [#1797] No use internalNioBuffer() in derived buffers as it is not meant for concurrent access 2013-09-02 14:17:19 +02:00
Norman Maurer
60b06df84f Add tests to try to track down some buffer issues 2013-09-02 14:17:16 +02:00
Norman Maurer
70f5a4e2ce [#1683] Remove used ChannelOptions 2013-09-02 10:07:10 +02:00
Norman Maurer
81258e9a4e [#1710] Add missing duplicate() overrides in interfaces 2013-09-02 10:02:12 +02:00
Norman Maurer
54d788f435 Remove legancy code which we not need anymore as we use gathering writes anyway everywhere 2013-09-01 11:00:20 +02:00
bgallagher
c149f4bcc0 Remove support from deregister a Channel from a EventLoop manually 2013-08-29 18:11:16 +02:00
Norman Maurer
2ffdd92b56 [#1798] Correctly handle skipping of too big frames 2013-08-29 17:53:20 +02:00
Norman Maurer
aed8c15326 [#1797] Throw IllegalArgumentException if AbstractByteBuf.skipBytes(...) is used with a negative value 2013-08-29 11:16:11 +02:00
Norman Maurer
5447fe1e59 Free up all buffers after the tests 2013-08-28 11:00:08 +02:00
Norman Maurer
cbf269e9b9 [#1788] Correctly decode CRC32 and ISIZE when using JdkZlibDecoder
Because of incorrect decoding a CompressionException was thrown before
2013-08-28 09:51:04 +02:00
Norman Maurer
088551db9c [#1792] PlatformDependent.freeDirectBuffer(..) now respect hasUnsafe() 2013-08-28 07:23:55 +02:00
Derek Troy-West
b669237bac HTTP Chunk, wrong delimiter written 2013-08-27 18:11:08 +09:00
Derek Troy-West
71acd96361 Currently the system variable to chose which type of zlib decoder is being negated 2013-08-27 08:27:18 +02:00
Vladimir Krivosheev
761e9ba956 ability to use Executor instead of ThreadFactory 2013-08-27 07:59:27 +02:00
Norman Maurer
6fc297bc42 [#1785] Fix incorrect javadocs 2013-08-27 06:54:50 +02:00
Norman Maurer
09a748abdb Bump up version to 4.1.0.Alpha1-SNAPSHOT 2013-08-26 15:18:18 +02:00
Norman Maurer
2e39b25cd4 [maven-release-plugin] prepare for next development iteration 2013-08-26 12:01:03 +02:00
Norman Maurer
b67659a866 [maven-release-plugin] prepare release netty-4.0.8.Final 2013-08-26 12:00:54 +02:00