Commit Graph

376 Commits

Author SHA1 Message Date
Norman Maurer
cd9a36d4e7 Merge pull request #553 from jfallows/aio-unmodified-buffer
Ensure unmodified buffer delivered via pipeline after AIO read completes
2012-08-24 09:25:01 -07:00
Trustin Lee
ba6c032180 [#557] Provide pre/post handler methods to ChannelInboundMessageHandler.inboundBufferUpdated()
- Add pre- and post- handler methods
2012-08-24 17:25:07 +09:00
Trustin Lee
c9174e0733 Prefer discardSomeReadBytes() 2012-08-24 17:22:14 +09:00
Trustin Lee
00188a2923 [#160] No response to write if server is using SslHandler and client is not
- Make SslHandler close the connection on SSLException or NotSslRecordException
2012-08-22 13:38:09 +09:00
Trustin Lee
b25996d024 [#486] Make NoSuchBufferException give more useful message.
- Remove confusing exception messages
- Do not use default exception messages wherever possible
2012-08-20 21:03:23 +09:00
John Fallows
3cce40bd79 Suppress unchecked cast warnings for config options. 2012-08-19 13:49:09 -07:00
Trustin Lee
2bb114bcb7 [#504] SslHandler.flush() notifies futures prematurely.
- Make use of ChannelFlushFutureNotifier to notify flush futures
  correctly
- Improve the test case to ensure this commit fixes the bug
2012-08-19 17:36:58 +09:00
Trustin Lee
3f101ad3d1 [#504] SslHandler.flush() notifies futures prematurely.
- Add ChannelFlushFutureNotifier
  - Extracted the functionality that keeps track of flush futures in
    AbstractChannel.  Will be used in SslHandler.
2012-08-19 17:05:51 +09:00
Trustin Lee
8bfbebc772 Rename TaskScheduler to ChannelTaskScheduler 2012-08-19 15:10:09 +09:00
Trustin Lee
44daa99d3f [#530] Allow using a bounded ByteBuf as the first inbound buffer
- Clean up
- Do not stop reading when reached at maxCapacity.
  - Just let handler drain the buffer and try again quickly.
- No more magic number in OIO buffer expansion
2012-08-19 14:48:56 +09:00
Trustin Lee
9e75a33d3d [#530] Allow using a bounded ByteBuf as the first inbound buffer 2012-08-19 13:55:12 +09:00
John Fallows
cd8e2576b4 Ensure unmodified buffer delivered via pipeline after read completes but before next read begins. 2012-08-18 11:04:10 -07:00
Trustin Lee
11c742f392 [#59] Make ChannelFuture implement Future<Void> 2012-08-18 22:53:58 +09:00
Trustin Lee
f75ba72aeb Allow using non-BlockingQueue
- NioEventLoop never uses takeTask(), and ConcurrentLinkedList is faster
  than LinkedBlockingQueue
2012-08-18 18:48:44 +09:00
Trustin Lee
421eabe666 [#473] Fix elevated context switching in SingleThreadEventExecutor
- Remove polling in SingleThreadEventExecutor
- Create a dedicated scheduled task scheduler called 'TaskScheduler'
- TaskScheduler is created per EventLoopGroup / EventExecutorGroup
- SingleThreadEventExecutor delegates all scheduled execution requests
  to TaskScheduler provided as a constructor parameter
- TaskScheduler is a specialized form of single threaded 
  ScheduledExecutorService which requires an EventExecutor as a
  parameter for all requests.
2012-08-18 18:40:21 +09:00
Trustin Lee
9c17304755 Use different EventLoopGroup for AIO transport tests
- plus tiny cleanup
2012-08-17 12:18:00 +09:00
Norman Maurer
8b66e65277 Merge pull request #515 from jfallows/master
Add support for AIO server channel accepting new channels onto a separate child event loop group. See #514.
2012-08-14 09:58:47 -07:00
John Fallows
148e629104 Use childGroup for accepted AioSocketChannels, children of previously bound AioServerSocketChannel. 2012-08-13 23:12:50 -07:00
norman
061252e4b4 Allow to config read/write timeout for the AIO transport. See #509 2012-08-14 08:06:54 +02:00
John Fallows
06fd869711 Add support for AIO scattering reads and gathering writes.
o Add ByteBuf.hasNioBuffers() method
 o Promote CompositeByteBuf.nioBuffers() methods to ByteBuf
 o Use ByteBuf.nioBuffers() methods from AioSocketChannel
2012-08-12 17:29:07 -07:00
Trustin Lee
d3a2835503 Add ServerBootstrap.group() that takes a single group 2012-08-10 20:26:04 +09:00
Trustin Lee
d298707198 [#502] Split EventLoop/EventExecutor into parent and children
- Add EventExecutorGroup and EventLoopGroup
- EventExecutor and EventLoop extends EventExecutorGroup and
  EventLoopGroup
  - They form their own group so that .next() returns itself.
- Rename Bootstrap.eventLoop() to group()
- Rename parameter names such as executor to group
- Rename *EventLoop/Executor to *EventLoop/ExecutorGroup
- Rename *ChildEventLoop/Executor to *EventLoop/Executor
2012-08-10 20:17:18 +09:00
Trustin Lee
f4fa5698c1 Add a TODO which should be done when buffer pool is implemented 2012-08-10 10:19:01 +09:00
norman
0334333c82 Fix checkstyle 2012-08-07 15:38:52 +02:00
norman
3ed3827760 Merge branch 'master' of ssh://github.com/netty/netty 2012-08-07 14:59:54 +02:00
norman
947f3bcd5f Merge branch 'master' of ssh://github.com/netty/netty 2012-08-07 14:46:01 +02:00
John Fallows
ed7613e183 Resolve issue #489 with an atomic readInProgress guard to prevent ReadPendingException. 2012-08-05 15:11:12 -07:00
Trustin Lee
f2eeed77e0 Remove a redundant method declaration 2012-08-05 18:43:32 +09:00
norman
3992472b30 cleanup 2012-08-01 14:06:54 +02:00
norman
b4991facf8 Remove unused import 2012-08-01 11:35:17 +02:00
norman
a3a58ecbc0 Fix a bug in suspend read. See #71 2012-08-01 11:35:03 +02:00
norman
6a15f7f5ce Merge branch 'master' into suspend_feature
Conflicts:
	transport/src/main/java/io/netty/channel/DefaultChannelHandlerContext.java
2012-08-01 09:03:33 +02:00
norman
16a4088344 Address @trustin 's comments and also make sure the accept of AIO is only triggered from the event loop. See #71 2012-07-31 11:42:29 +02:00
norman
8b473dce6c Rename class 2012-07-30 15:07:12 +02:00
norman
ba1c7c5c55 Replace usage of QueueFactory with ConcurrentLinkedQueue and LinkedBlockingQueue. See #477 2012-07-30 08:01:46 +02:00
Norman Maurer
57e7255566 Add support to suspend reads. See #71 2012-07-27 20:02:47 +02:00
Daniel Bevenius
927c4ee8cb Minor typo in exception message 2012-07-25 20:51:06 +02:00
Trustin Lee
5a613f379e Make ByteBuf dynamic / Introduce an interface for composite buffers
- Replace ByteBufferBackedByteBuf with DirectByteBuf
- Make DirectByteBuf and HeapByteBuf dynamic
- Remove DynamicByteBuf
- Replace Unpooled.dynamicBuffer() with Unpooled.buffer() and
  directBuffer()
- Remove ByteBufFactory (will be replaced with ByteBufPool later)
- Add ByteBuf.Unsafe (might change in the future)
2012-07-19 20:25:47 +09:00
Trustin Lee
7fbd1e5095 [#454] Unnecessary thread interruption in DefaultEventExecutor 2012-07-13 13:17:35 +09:00
Trustin Lee
1c4d0d0f57 Optimize AioEventLoop.findChannel() 2012-07-10 18:04:41 +09:00
Trustin Lee
f5fa671459 Fix regression (see comment) 2012-07-10 15:38:31 +09:00
Trustin Lee
d66a187b5d Fixed a bug where discardReadBytes is called in a wrong place 2012-07-10 14:25:46 +09:00
Trustin Lee
170a04fc72 Revert the buggy commit in AioEventLoop
Also decreased the max stack depth of AioCompletionHandler to 4
(Integer.MAX_VALUE was for testing)
2012-07-10 14:12:14 +09:00
Trustin Lee
701cda2819 Require a user specify the same AioEventLoop
.. both when create an AIO channel and registering it

- Also fixed a bug in AbstractChannel where is does not handle
  registration failure correctly.
2012-07-10 13:57:45 +09:00
Norman Maurer
d233be7041 AIO: Act on the right ByteBuf when a exception was caught during write 2012-07-09 17:27:20 +02:00
Trustin Lee
e157ea1a66 Allow a user use any type as a ReplayingDecoder state / AIO cleanup
- Removed VoidEnum because a user can now specify Void instead
- AIO: Prefer discardReadBytes to clear
- AIO: Fixed a potential bug where notifyFlushFutures() is not called
       if flush() was requested with no outbound data
2012-07-09 20:40:43 +09:00
Norman Maurer
0289dadca4 Don't call Field.get(..) if we can avoid it 2012-07-08 17:41:12 +02:00
Norman Maurer
adb4b87fa8 Replace catch of Exception with Throwable as Field.get(..) can also throw an Error 2012-07-08 17:29:42 +02:00
Trustin Lee
a58533fdad Due to the recent changes with AsynchronousChannelGroup use, there's no
need to schedule read operation later.
2012-07-09 00:04:55 +09:00
Trustin Lee
ee019d344e Fix potential NPE in AioEventLoop / Always notify flush futures 2012-07-08 22:44:15 +09:00