Commit Graph

436 Commits

Author SHA1 Message Date
Norman Maurer
1f049367a4 Make use of ByteBufProcessor for extract initial line and headers
This gives some nice performance boost as readByte() is quite expensive because of the index / replay checks.
2014-01-16 20:14:28 +01:00
Trustin Lee
f3a842ecca [maven-release-plugin] prepare for next development iteration 2013-12-22 22:06:15 +09:00
Trustin Lee
888dfba76f [maven-release-plugin] prepare release netty-5.0.0.Alpha1 2013-12-22 22:06:06 +09:00
Trustin Lee
94d6e44bba Change the return type of EmbeddedChannel.read*() from Object to an ad-hoc type parameter
.. so that there's no need to explicitly down-cast.

Fixes #2067
2013-12-16 22:22:47 +09:00
Trustin Lee
6ddfab3c9c Fix another buffer leak in XmlFrameDecoderTest 2013-12-16 16:16:37 +09:00
Trustin Lee
40def86eb4 Fix buffer leaks in XmlFrameDecoderTest 2013-12-16 15:36:49 +09:00
Trustin Lee
e744926817 Fix inspector warnings 2013-12-16 14:45:57 +09:00
Mirko Caserta
5e851460a9 CDATA support 2013-12-16 14:43:07 +09:00
Mirko Caserta
c8bd76d9a9 Fixed the XML decoder 2013-12-16 14:43:07 +09:00
Trustin Lee
1084242df9 Add XML decoder
- based on @mcaserta's work at https://github.com/netty/netty/pull/1121
- not ready for a merge yet
2013-12-16 14:42:34 +09:00
Norman Maurer
643ce2f8c0 Fix all leaks reported during tests
- One notable leak is from WebSocketFrameAggregator
- All other leaks are from tests
2013-12-07 00:47:30 +09:00
Trustin Lee
8b495bb6e1 Fix bugs in ZLIB codec where they produce malformed stream or their streams are not flushed on time
- Fixes #2014
- Add the tests that mix JDK ZLIB codec and JZlib codecs
- Fix a bug where JdkZlibEncoder does not encode the GZIP header when nothing was written to te channel
- Fix a bug where the encoders do not consider the overhead of the wrapper format when calculating the estimated compressed output size.
- Fix a bug where the decoders do not discard the received data after the compressed stream is finished
2013-11-29 18:08:34 +09:00
Trustin Lee
110745b0eb Remove the distinction of inbound handlers and outbound handlers
- Fixes #1808
- Move all methods in ChannelInboundHandler and ChannelOutboundHandler up to ChannelHandler
- Remove ChannelInboundHandler and ChannelOutboundHandler
- Deprecate ChannelInboundHandlerAdapter, ChannelOutboundHandlerAdapter, and ChannelDuplexHandler
- Replace CombinedChannelDuplexHandler with ChannelHandlerAppender
  because it's not possible to combine two handlers into one easily now
- Introduce 'Skip' annotation to pass events through efficiently
- Remove all references to the deprecated types and update Javadoc
2013-11-27 17:31:28 +09:00
Trustin Lee
807d96ed6c Simplify bundle generation / Add io.netty.versions.properties to all JARs
- Fixes #2003 properly
- Instead of using 'bundle' packaging, use 'jar' packaging.  This is
  more robust because some strict build tools fail to retrieve the
  artifacts from a Maven repository unless their packaging is not 'jar'.
- All artifacts now contain META-INF/io.netty.version.properties, which
  provides the detailed information about the build and repository.
- Removed OSGi testsuite temporarily because it gives false errors
  during split package test and examination.
- Add io.netty.util.Version for easy retrieval of version information
2013-11-26 22:00:14 +09:00
Trustin Lee
26415b8f4c Use StringUtil.simpleClassName(..) instead of Class.getSimpleName() where necessary
- Class.getSimpleName() doesn't render anonymous classes very well
- + some minor cleanup
2013-11-04 19:42:33 +09:00
Trustin Lee
6b0025430e Bump the version to 5.0.0.Alpha1 2013-11-04 19:14:40 +09:00
Norman Maurer
208411f9a9 Also pass the ByteOrder in getUnadjustedFrameLength method. Part of #1960 2013-11-02 14:27:23 +01:00
Trustin Lee
f767abe5b0 Allow a user to define his/her own length field decoder
- Fixes #1960
2013-11-02 21:58:08 +09:00
Luke Wood
b31a1b2dca [#1958] Use CRC32-C in Snappy as per the spec 2013-11-01 20:53:16 +01:00
Trustin Lee
0dda7df344 Add a shortcut method for collision-free naming 2013-10-25 20:01:31 +09:00
Trustin Lee
dc009b2c2c Replace UniqueName with Constant and ConstantPool
- Proposed fix for #1824

UniqueName and its subtypes do not allow getting the previously registered instance.  For example, let's assume that a user is running his/her application in an OSGi container with Netty bundles and his server bundle.  Whenever the server bundle is reloaded, the server will try to create a new AttributeKey instance with the same name.  However, Netty bundles were not reloaded at all, so AttributeKey will complain that the name is taken already (by the previously loaded bundle.)

To fix this problem:

- Replaced UniqueName with Constant, AbstractConstant, and ConstantPool.  Better name and better design.

- Sctp/Udt/RxtxChannelOption is not a ChannelOption anymore.  They are just constant providers and ChannelOption is final now.  It's because caching anything that's from outside of netty-transport will lead to ClassCastException on reload, because ChannelOption's constant pool will keep all option objects for reuse.

- Signal implements Constant because we can't ensure its uniqueness anymore by relying on the exception raised by UniqueName's constructor.
2013-10-25 19:21:53 +09:00
Norman Maurer
5a844d0bd6 [#1812] Rework ByteToMessageDecoder.channelRead(..) method to allow for inlining 2013-10-24 07:15:40 +02:00
Norman Maurer
3de7a0bf76 Revert "[#1812] Rework ByteToMessageDecoder.channelRead(..) method to allow for inlining"
This reverts commit b7262ab3da.
2013-10-23 21:13:03 +02:00
Norman Maurer
b7262ab3da [#1812] Rework ByteToMessageDecoder.channelRead(..) method to allow for inlining 2013-10-23 19:54:24 +02:00
Norman Maurer
42cce12498 [#1907] LengthFieldPrepender should better extend MessageToMessageEncoder for less memory copies 2013-10-11 06:38:18 +02:00
Norman Maurer
522dbf8543 [#1906] Use a ByteBuf allocator from the ByteBufAllocator when encode Strings 2013-10-09 21:19:36 +02:00
Norman Maurer
f4edb2f689 [#1893] Fix bug in JdkZlibDecoder which did not let it handle large data 2013-10-07 08:07:53 +02:00
Norman Maurer
2ffdd92b56 [#1798] Correctly handle skipping of too big frames 2013-08-29 17:53:20 +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
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
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
Norman Maurer
65d24a7647 [#1735] Disable usage of JdkZlibDecoder by default, will be enabled in 4.1.0.Final 2013-08-26 08:15:30 +02:00
Norman Maurer
39cabcd36c [#1481] Add a JdkZlibDecoder which has no dependencies 2013-08-14 07:41:28 +02:00
Norman Maurer
7d31943326 Remove some dead code 2013-08-11 21:37:43 +02:00
Norman Maurer
73755d1233 [#1729] Let StringEncoder extend MessageToMessageEncoder and so safe a memory copy 2013-08-11 21:24:02 +02:00
Norman Maurer
9a88c50ffb [#1728] Recycle list after done with it in ReplayingDecoder/ByteToMessageDecoder channelInactive(..) 2013-08-11 21:04:55 +02:00
Norman Maurer
26ddf0849f [#1714] Make sure ByteArrayDecoder also works correctly with pooled buffers 2013-08-09 08:40:43 +02:00
Norman Maurer
1547876e97 Tiny optimizations 2013-08-09 08:24:24 +02:00
Norman Maurer
1d3560e389 [maven-release-plugin] prepare for next development iteration 2013-08-08 13:53:28 +02:00
Norman Maurer
8e97e6c461 [maven-release-plugin] prepare release netty-4.0.7.Final 2013-08-08 13:53:19 +02:00
Trustin Lee
87b17e195a Grammar 2013-08-05 17:40:45 +09:00
Norman Maurer
4d064d85df Rename class 2013-08-02 07:24:49 +02:00
Norman Maurer
ebee56ef49 More tests related to self removal from pipeline in ByteToMessageDecoder and ReplayingDecoder 2013-08-02 07:23:46 +02:00
Norman Maurer
487c28d93e Add testcases to prove that remove ReplayingDecoder/ByteToMessageDecoder from within the decode(...) method works 2013-08-01 20:42:46 +02:00
Norman Maurer
3f2000fa3a [maven-release-plugin] prepare for next development iteration 2013-08-01 10:59:55 +02:00
Norman Maurer
3f70d5caa4 [maven-release-plugin] prepare release netty-4.0.6.Final 2013-08-01 10:59:46 +02:00
Norman Maurer
a06295fe0a Correctly fix problem in ByteToMessageDecoder and ReplayingDecoder which could let to have a released buffer passed to the decode methods.
This fixes #1664 and revert also the original commit which was meant to fix it 3b1881b523 . The problem with the original commit was that it could delay handlerRemove(..) calls and so mess up the order or forward bytes to late.
2013-08-01 09:54:07 +02:00