Commit Graph

4310 Commits

Author SHA1 Message Date
Trustin Lee
30e80f8c5c Fix a regression in ChannelInboundMessageHandlerAdapter
- Should forward the unsupported message to the next inbound buffer rather than the next outbound buffer.
2013-02-08 00:08:39 +09:00
Trustin Lee
ec51b359c9 Fix checkstyle again 2013-02-08 00:00:14 +09:00
Trustin Lee
9aa9d8a99b Fix checkstyle
- Basically a workaround for IntelliJ's automatic import optimization
2013-02-07 23:58:21 +09:00
Trustin Lee
d4742bbe16 Clean up abstract ChannelHandler impls / Remove ChannelHandlerContext.hasNext*()
- Rename ChannelHandlerAdapter to ChannelDuplexHandler
- Add ChannelHandlerAdapter that implements only ChannelHandler
- Rename CombinedChannelHandler to CombinedChannelDuplexHandler and
  improve runtime validation
- Remove ChannelInbound/OutboundHandlerAdapter which are not useful
- Make ChannelOutboundByteHandlerAdapter similar to
  ChannelInboundByteHandlerAdapter
- Make the tail and head handler of DefaultChannelPipeline accept both
  bytes and messages.  ChannelHandlerContext.hasNext*() were removed
  because they always return true now.
- Removed various unnecessary null checks.
- Correct method/field names:
  inboundBufferSuspended -> channelReadSuspended
2013-02-07 23:47:45 +09:00
Trustin Lee
7eed272e57 Add FilteredMessageBuf 2013-02-07 23:37:04 +09:00
Norman Maurer
a13246a2b6 [#1024] Limit the number of SelectionKey.interestedOps(..) calls for performance reasons 2013-02-07 15:34:38 +01:00
Norman Maurer
611bb32846 Fix build of all-in-one jar 2013-02-07 15:09:58 +01:00
Norman Maurer
582c6be456 [#1023] WebSocketClientHandshaker00 now also work with non heap buffers 2013-02-07 14:21:11 +01:00
Norman Maurer
d98fbf7a82 Upgrade to new barchart-udt-bundle 2013-02-06 21:31:30 +01:00
ursa
f09b85f4e7 Add test for HttpPostRequestDecoder: validate '\r' symbols in the end of binary stream are parsed correctly. 2013-02-06 20:21:56 +01:00
Andrei Pozolotin
f24872c566 [#1010] Add verify module to check osgi bundles 2013-02-06 20:13:07 +01:00
Norman Maurer
56b1a18de0 Upgrade barchart udt bundle 2013-02-06 08:04:49 +01:00
Norman Maurer
fd75615d7a [#870] Convert all modules into osgi bundles 2013-02-06 07:57:11 +01:00
ursa
992d431a95 Fix line-end detection for binary streams upload.
- Related: #1016
2013-02-06 11:54:05 +09:00
Norman Maurer
46bedb8151 Add javadocs to make contract more clear 2013-02-05 20:29:38 +01:00
Norman Maurer
86b4cde82f Make sure the inbound/outbound buffer of the ChannelHandlerContext is only modified within the EventLoop 2013-02-05 16:19:04 +01:00
Trustin Lee
fd40df9033 Rename the artifact 'netty' to 'netty-all' and make it non-OSGi
- We are going to make individual modules OSGi
2013-02-05 18:49:45 +09:00
Trustin Lee
598e70fd8f Upgrade to netty-build-16 2013-02-05 18:48:19 +09:00
Trustin Lee
cb4b673456 Disable AIO transport tests on Windows
- Related: #726
2013-02-05 17:06:56 +09:00
Trustin Lee
2e44a1ba91 Fix test failures in SingleThreadEventLoopTest on Windows
- It seems like Windows sometimes sleeps less than specified.
- Related issue: #726
2013-02-05 16:27:37 +09:00
Norman Maurer
5b81e1692d Move non socket specific stuff out of the socket package, part 2 2013-02-01 10:32:27 +01:00
Norman Maurer
ade3cc1329 Move non socket specific stuff out of the socket package 2013-02-01 09:10:28 +01:00
Luke Wood
bfe44180f9 Fix SnappyFramedDecoder issues
- Checksum header was being incorrectly read due to incorrect order of
  shift and masking operations.
- Length field of 1-byte copy was being incorrectly interpreted due to a
  typo in the binary mask used to extract it.
- Use ByteBuf.readUnsignedByte() instead of readByte() & 0xff
- Use bitwise-OR wherever possible
- Use EmbeddedByteChannel to test
- Use ByteBuf comparison instead of array comparison
- Work done by @lw346 and then revised by @trustin
2013-02-01 13:10:34 +09:00
Trustin Lee
2ec932798f Replace .readable() and .writable() to .isReadable() and .isWritable() 2013-01-31 18:24:33 +01:00
Trustin Lee
42c65cca3a Make MessageBuf bounded
- Move common methods from ByteBuf to Buf
- Rename ensureWritableBytes() to ensureWritable()
- Rename readable() to isReadable()
- Rename writable() to isWritable()
- Add isReadable(int) and isWritable(int)
- Add AbstractMessageBuf
- Rewrite DefaultMessageBuf and QueueBackedMessageBuf
  - based on Josh Bloch's public domain ArrayDeque impl
2013-01-31 18:11:06 +01:00
Norman Maurer
ec013bf2d3 [#983] Force the user to implement an actual ChannelInboundHandler or ChannelOutboundHandler
For this ChannelInboundHandler* and ChannelOutboundHandler* was made package private
2013-01-31 15:50:27 +01:00
Trustin Lee
1f2aca02da Add more compiler plugin options to make compilerArguments works 2013-01-31 21:02:56 +09:00
Trustin Lee
db37652f2a Add compiler options to find unchecked/deprecated code 2013-01-31 20:57:58 +09:00
Norman Maurer
2ad1451ce8 Fix semantic of DefaultAttribute impl on setIfAbsent 2013-01-31 11:52:36 +01:00
Courtney Robinson
2d9cc9f63b Allow to specify the mode the encoder uses for form params. This allows it to be used with OAUTH
The OAuth 1 spec has small deviations from UrlEncoder.encode's output.

+ Percent encodes the parameters
+ Added tests to verify
+ See relevant OAuth section
http://oauth.net/core/1.0/#encoding_parameters
+ Detailed explanation http://hueniverse.com/oauth/guide/authentication/
2013-01-31 07:49:34 +01:00
Trustin Lee
b46760f93f Upgrade to netty-build-15 to fix build issues 2013-01-31 14:11:54 +09:00
Trustin Lee
071b067b3f Add missing file
- Related issue: #1003
2013-01-31 12:28:27 +09:00
Trustin Lee
073517dc63 Rename localtime to worldtime so that a user thinks it's a local transport example
- Fixes #1003
2013-01-31 12:27:57 +09:00
Trustin Lee
39357f3835 Enable TCP_NODELAY and SCTP_NODELAY by default
- Fixes #939
- Add PlatformDependent.canEnableTcpNoDelayByDefault()
  - Currently returns false on Android. Will change if necessary later.
2013-01-31 12:17:09 +09:00
Trustin Lee
152c969eab Make Bootstrap and ServerBootstrap thread-safe
- Additional fix for: #970
- Use LinkedHashMap again to save memory consumption
- ServerBootstrap now makes a copy of child parameters so that modifying ServerBootstrap after bind() does not affect the already-bound servers. This also makes child channel initialization potentially faster due to reduced garbage iterator.
2013-01-31 11:34:28 +09:00
Trustin Lee
604b359d9e Use InetSocketAddress(0) if no localAddress is specified for connect() operation in UDT 2013-01-31 10:22:03 +09:00
Norman Maurer
eeab6767db Tighten up generics on ServerBootstrap again as it was fixed in UDT 2013-01-30 21:38:15 +01:00
Andrei Pozolotin
82f876f7db [#999] Refactor UDT transport to make use of the ServerChannel interface 2013-01-30 21:17:23 +01:00
Norman Maurer
97ea338bce [#971] Fix a bug where the HttpContentCompressor was try to start compressing on an empty response 2013-01-30 20:58:07 +01:00
Norman Maurer
641db5cdfe Only write the header as it should be 2013-01-30 20:40:06 +01:00
Norman Maurer
cff2edf75d Remove not used enum 2013-01-30 19:02:29 +01:00
Trustin Lee
33c9f3f1e5 Relax ServerBootstrap type constraint to support UDT properly 2013-01-30 22:04:20 +09:00
Trustin Lee
05d16cd361 Made Bootstrap and ServerBootstrap copy constructors private as suggested 2013-01-30 21:55:10 +09:00
Trustin Lee
b1b0319bbe Fix build errors and warnings 2013-01-30 21:47:34 +09:00
Norman Maurer
1bb003d9ae [#995] Replace AtomicReference usage with AtomicReferenceFieldUpdater
This will safe as an example 2gb mem when have 10 DefaultHandlerContext instances per connection and the connection count is 1000000.
Also kind of related to [#920]
2013-01-30 13:45:39 +01:00
Trustin Lee
03de5f479a Fix build errors 2013-01-30 21:43:37 +09:00
Trustin Lee
23438de66f Move AbstractBootstrap.ChannelFactory out of AbstractBootstrap and hide AbstractBootstrap from a user
- Fixes #998
- Also generified ChannelFactory
2013-01-30 21:40:49 +09:00
Trustin Lee
86135a4080 Make ServerBootstrap final
- Related: #997
2013-01-30 21:14:23 +09:00
Trustin Lee
7c50c1e2e6 Make Bootstrap and ServerBootstrap implement Cloneable and rename duplicate() to clone()
- Fixes #997
- Replace duplicate() with clone()
- Add copy constructor for simplicity
- Can now clone invalid/incomplete bootstrap
- Upgrade to netty-build-14 to disable SuperClone checkstyle module
- Finalize class hierarchy so no subclasses are introduced
2013-01-30 21:12:42 +09:00
Luke Wood
bd0339ce1a Fix buffer over-run in Snappy codec when emitting a copy that leaves < 4 bytes remaining 2013-01-30 12:15:57 +01:00