Commit Graph

3217 Commits

Author SHA1 Message Date
Trustin Lee
609674bda2 Fix codec embedder
- AbstractCodecEmbedded analyzes the list of the specified headers
  and inserts proper conversion handlers
2012-06-02 22:54:13 -07:00
Trustin Lee
26307cbc3e Merge pull request #379 from jroper/patch-1
Fixing #378, bug in DefaultCookie equals and compareTo
2012-06-02 19:49:18 -07:00
James Roper
e8a74c8ad0 Fixing #378, when path or domain are null in both this and that, equals and compareTo return false even when the cookies are equal. 2012-06-03 01:04:23 +03:00
Norman Maurer
f34fc73e89 Some changes to the examples to show the usage of @Sharable 2012-06-02 20:13:58 +02:00
Trustin Lee
19dcb81727 Add comments for easier understanding 2012-06-02 02:43:26 -07:00
Trustin Lee
01a5bd41f0 Add Channel.type() which tells if stream-oriented or message-oriented
- DefaultChannelPipeline uses this information to reject invalid buffer
  access in inbound(Message|Byte)Buffer.  Otherwise, a user can access
  a message buffer when the channel is stream-oriented.
- Because ChannelType cannot be both STREAM and MESSAGE, catch-all
  buffer has been removed to avoid confusion and unexpected behavior
  (it's already causing headache.)
- As a result, codec embedder needs rework.
2012-06-02 01:58:15 -07:00
Trustin Lee
45f19d02ff Remove the codecs and handlers that can't make it on time for 4.0.0.A1
- Removed ones are: IP filer and HTTP multipart codec
  - Needs closer code review and polishing
  - Sorry. I'll add them back in the next alpha releases
  - SSL handler and ChunkedWriteHandler also need more work, but
    I really want to make them part of the first alpha because they
    are used pretty often by users.
2012-06-02 01:38:10 -07:00
Trustin Lee
cc4f705029 Replace ChannelBuffer.toByteBuffer() with hasNioBuffer() and nioBuffer()
... just like we do with byte arrays.  toByteBuffer() and
toByteBuffers() had an indeterministic behavior and thus it could not
tell when the returned NIO buffer is shared or not.  nioBuffer() always
returns a view buffer of the Netty buffer.  The only case where
hasNioBuffer() returns false and nioBuffer() fails is the
CompositeChannelBuffer, which is not very commonly used and *slow*.
2012-06-02 01:30:55 -07:00
Trustin Lee
14e68aca57 Fix a Javadoc error 2012-06-01 23:18:46 -07:00
Trustin Lee
14cf227c46 Fix a test failure 2012-06-01 23:11:01 -07:00
Trustin Lee
720f62d983 Fix a compilation error 2012-06-01 22:58:26 -07:00
Trustin Lee
04cf1c8199 Use custom thread factory by default to better recognize the threads
... from their names
2012-06-01 22:57:54 -07:00
Trustin Lee
61e169e53a Remove EventExecutor.parent(), which is of no use 2012-06-01 22:33:53 -07:00
Trustin Lee
4440386494 Little bit of optimization 2012-06-01 18:34:19 -07:00
Trustin Lee
e2a617b07b Fix a bug where DetectionUtil.hasUnsafe() returns a wrong value 2012-06-01 18:25:56 -07:00
Trustin Lee
141a05c831 Strict thread model / Allow assign an executor to a handler
- Add EventExecutor and make EventLoop extend it
- Add SingleThreadEventExecutor and MultithreadEventExecutor
- Add EventExecutor's default implementation
- Fixed an API design problem where there is no way to get non-bypass
  buffer of desired type
2012-06-01 17:51:19 -07:00
Trustin Lee
754cd99843 Port ChunkedWriteHandler 2012-06-01 00:36:12 -07:00
Trustin Lee
ab5043b3c7 Fixed LocalAddressTest 2012-05-31 21:22:03 -07:00
Trustin Lee
5243d3d0f0 Add @Sharable annotation to ChannelInitializer 2012-05-31 17:05:34 -07:00
Trustin Lee
f2eddda5a4 Call discardReadBytes() on outbound byte buffers when possible
- Also fixed a test failure in codec-http
2012-05-31 16:59:54 -07:00
Trustin Lee
d626561b59 Define a dedicated exception for performing blocking ops in event loop 2012-05-31 16:47:00 -07:00
Trustin Lee
7be188f8c0 Ported BlockingReadHandler 2012-05-31 16:44:51 -07:00
Trustin Lee
468918227a Remove unnecessary parameter in AttributeKey and ChannelOption
- Removed UniqueKey which does nothing
- The valueType parameter was not needed at all because we do not need
  type information in runtime at all.
2012-05-31 16:03:57 -07:00
Trustin Lee
9bb5b34887 Remove BufferedWriteHandler
- All writes in Netty 4 are buffered by default and a user can call
  flush() to flush it.
2012-05-31 15:55:11 -07:00
Trustin Lee
2aa466640e Ported Read/WriteTimeoutHandler with simplification
- The default behavior is now to close the channel on timeout.  A user
  can override this behavior, but I would just use IdleStateHandler or
  use eventLoop's timer facility directly for finer control.
2012-05-31 15:53:38 -07:00
Trustin Lee
5f24f176bb Port ReadTimeoutHandler 2012-05-31 15:04:25 -07:00
Trustin Lee
7ddc93bed8 Ported IdleStateHandler / Forward-ported the UptimeClient example
- Add ChannelHandlerContext.eventLoop() for convenience
- Bootstrap and ServerBootstrap handles channel initialization failure
  better
- More strict checks for missing @Sharable annotation
  - A handler without @Sharable annotation cannot be added more than
    once now.
2012-05-31 14:54:48 -07:00
Trustin Lee
77274ae743 Automated code clean-up 2012-05-31 12:03:01 -07:00
Trustin Lee
734d452be2 Apply missing changes in the branch '3' 2012-05-31 11:50:08 -07:00
Trustin Lee
0cd766df30 Move HTTP multipart classes to its own package / Clean-up
- Move CaseIgnoringComparable to netty-common
- Add HttpConstants
2012-05-31 11:32:42 -07:00
Trustin Lee
c8fa42beaf Rename wrapPrimitive() to copyPrimitive() / Add tests / Tidy up (#167)
- Add ChannelBuffers.copyShort(short...)
2012-05-31 11:13:01 -07:00
Trustin Lee
429535e6c8 More primitive wrapper methods (#167)
- ChannelBuffers.wrap(Float|Double)(...)
- Handle the case where there is only one value.
2012-05-31 10:51:27 -07:00
Trustin Lee
49bda34a5d Fix a bug where ChannelBufferHolder.isEmpty() returns a wrong value
.. when it has a byte buffer
2012-05-31 09:14:39 -07:00
Trustin Lee
0fd824c3bb Fix UnsupportedOperationException 2012-05-31 09:11:07 -07:00
Trustin Lee
633fada6ec Take advantage of the new method in ChannelInboundStreamHandlerAdapter 2012-05-31 09:07:10 -07:00
Trustin Lee
3584da2dad Use ChannelInboundStreamHandlerAdapter in EchoClientHandler 2012-05-31 09:04:19 -07:00
Trustin Lee
2a63acef4d More convenient inbound stream handler / Smarter inbound buffer cleanup
- Added a new convenience method to ChannelInboundstreamHandlerAdapter 
- EchoServerHandler uses the new method
- DefaultChannelPipeline calls inboundByteBuffer.discardReadBytes()
  when it is sure there's no memory copy involved
2012-05-31 09:03:31 -07:00
Trustin Lee
665777e6f9 Add InternetProtocolFamily and use it with NioDatagramChannel 2012-05-31 02:49:39 -07:00
Trustin Lee
197f31c90e Test all supported SPDY session management 2012-05-31 02:06:53 -07:00
Trustin Lee
a494f201fc Call setHandshakeComplete() before the handler replacement (#332)
- Contributed by @normanmaurer
2012-05-31 02:02:02 -07:00
Trustin Lee
c32df371ab Fix compilation errors 2012-05-31 01:55:30 -07:00
Trustin Lee
7ac89ace4f Finished forward-porting SPDY codec 2012-05-31 01:53:58 -07:00
Trustin Lee
32c982b478 Fix NPE in OioChildEventLoop 2012-05-31 01:19:54 -07:00
Trustin Lee
131eef2c51 Forward-porting SPDY codec 2012-05-31 00:37:27 -07:00
Trustin Lee
53f16ce003 Add more convenience methods to Bootstrap and ServerBootstrap 2012-05-30 23:47:15 -07:00
Trustin Lee
34f697a06c Forward-port the JBoss Marshalling codec 2012-05-30 23:36:03 -07:00
Trustin Lee
d7a198a60f Zap marshalling and spdy codec to forwardport again 2012-05-30 23:14:18 -07:00
norman
7fb64e2046 A small optimization for the fix of #360 2012-05-30 23:06:06 -07:00
Sun Ning
f2df20ddff fix #360, add check for empty buffer; also add unit test for this scenario 2012-05-30 23:05:43 -07:00
Norman Maurer
59b5c3a328 Add workaround to let the sleep work correctly in windows too. See #356
Conflicts:

	common/src/main/java/io/netty/util/HashedWheelTimer.java
	common/src/main/java/io/netty/util/internal/DetectionUtil.java
2012-05-30 19:28:42 -07:00