Commit Graph

232 Commits

Author SHA1 Message Date
Trustin Lee
595e1067c7 [maven-release-plugin] prepare release netty-4.0.0.Alpha5 2012-09-28 17:57:04 +09:00
Trustin Lee
b3d568c4d2 de-duplicate plugin versions 2012-09-28 17:45:40 +09:00
Trustin Lee
1bb5ac110f [#600] mvn clean package on OSX throws Exception
* Choose port randomly
* Ensure SO_REUSEADDR is not set at any case
* Ensure the port works for both wildcard and localhost
2012-09-28 16:27:23 +09:00
Trustin Lee
7c75dfb456 Remove System.err.printlns 2012-09-22 12:08:58 +09:00
Trustin Lee
0b71afb81c Improve the stability of ServerSocketSuspendTest 2012-09-22 12:05:00 +09:00
Norman Maurer
cc1e4d3bc7 Fix BindException on OSX. See #600 2012-09-14 07:22:02 +02:00
norman
3295145e88 [maven-release-plugin] prepare for next development iteration 2012-09-13 10:40:52 +02:00
norman
42685759de [maven-release-plugin] prepare release netty-4.0.0.Alpha4 2012-09-13 10:40:44 +02:00
norman
df72356d7d Rename classes as result of descussion on #594 2012-09-12 14:04:41 +02:00
norman
ec1339d775 Finish the refactoring of bootstrap 2012-09-11 09:34:51 +02:00
Trustin Lee
f2538a996d [maven-release-plugin] prepare for next development iteration 2012-08-30 16:47:52 +09:00
Trustin Lee
628c5598b3 [maven-release-plugin] prepare release netty-4.0.0.Alpha3 2012-08-30 16:46:58 +09:00
Trustin Lee
a1e8dad4ad Fix a bug in shutdownOutput() implementations where wrong ChannelFuture is notified 2012-08-30 16:38:08 +09:00
Trustin Lee
b4643c42aa Ensure ChannelInputShutdownEvent is triggered only once 2012-08-30 13:35:34 +09:00
Trustin Lee
d03de0f3ca [#107] Add support for closing either input or output part of a channel
- Add ChannelOption.ALLOW_HALF_CLOSURE
  - If true, ChannelInputShutdownEvent is fired via userEventTriggered()
    when the remote peer shuts down its output, and the connection is 
    not closed until a user calls close() explicitly.
  - If false, the connection is closed immediately as it did before.
- Add SocketChannel.isInputShutdown()
- Add & improve test cases related with half-closed sockets
2012-08-29 21:49:39 +09:00
Trustin Lee
bfdc28bd67 Ensure SocketShutdownOutputTest tests if half-closed socket is writable 2012-08-29 20:49:48 +09:00
Trustin Lee
02f3df55a8 [#107] Add support for closing either input or output part of a channel
- Add shutdownOutput() and isOutputShutdown() to SocketChannel
2012-08-29 13:26:29 +09:00
Trustin Lee
47f26d219d Simplify ServerSocketSuspendTest 2012-08-29 13:15:24 +09:00
Trustin Lee
e55a1f11b5 [#559] Fix SocketSuspendTest.testSuspendAccept()
- Reimplemented the test
- Fixed various bugs related with read/accept suspension found while testing
  - defaultInterestOps of NioServerSocketChannel should be OP_ACCEPT
  - There's no need do deregister and re-register to suspend/resume accept()
  - Occational infinite loop with 100% CPU consumption in OioEventLoop, caused by OioSocketChannel
  - Even if read/accept is suspended, what's read or accepted should be notified to a user
2012-08-28 15:55:51 +09:00
Trustin Lee
73720c422d [maven-release-plugin] prepare for next development iteration 2012-08-21 15:41:04 +09:00
Trustin Lee
68bef8cb99 [maven-release-plugin] prepare release netty-4.0.0.Alpha2 2012-08-21 15:40:45 +09:00
Trustin Lee
0a43350c66 [maven-release-plugin] prepare for next development iteration 2012-08-21 14:41:45 +09:00
Trustin Lee
56211fee59 [maven-release-plugin] prepare release netty-4.0.0.Alpha2 2012-08-21 14:39:59 +09:00
Trustin Lee
5c68333c00 Do not deploy testsuite 2012-08-21 14:34:14 +09:00
Trustin Lee
a0e34fd93a [maven-release-plugin] prepare for next development iteration 2012-08-21 14:13:38 +09:00
Trustin Lee
72ccf65093 [maven-release-plugin] prepare release netty-4.0.0.Alpha2 2012-08-21 14:13:17 +09: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
f02ce0fdca [#530] Allow using a bounded ByteBuf as the first inbound buffer
- Make the test run faster
2012-08-19 14:51: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
Trustin Lee
9c17304755 Use different EventLoopGroup for AIO transport tests
- plus tiny cleanup
2012-08-17 12:18:00 +09:00
Norman Maurer
1162f26df5 @Ignore bad test-case for now. See #503 2012-08-12 11:07:06 +02: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
norman
a442789f7a Add a testcase for suspend accept. it currently fails not sure why yet. See #71 2012-08-01 11:37:36 +02:00
Trustin Lee
d801459cb8 [maven-release-plugin] prepare for next development iteration 2012-07-10 23:11:33 +09:00
Trustin Lee
527f2f6c6e [maven-release-plugin] prepare release netty-4.0.0.Alpha1 2012-07-10 23:10:48 +09:00
Trustin Lee
c77f107f5f Made the AIO transport faster / Fixed a bug in SingleThreadEventLoopTest
- Used reflection hack to dispatch the tasks submitted by JDK
  efficiently.  Without hack, there's higher chance of additional
  context switches.
- Server side performance improved to the expected level.
- Client side performance issue still under investigation
2012-07-08 21:49:15 +09:00
Trustin Lee
3e2953cf92 Add AIO transport to the test suite 2012-06-18 16:21:05 +09:00
Trustin Lee
e1faea035e Automatic clean-up with Eclipse
- Mostly import organization & whitespace removal
2012-06-11 23:04:04 +09:00
Trustin Lee
6211e53e86 Code clean-up based on IntelliJ code analysis 2012-06-11 22:54:28 +09:00
Trustin Lee
876847fd20 Merge MessageBufs and ByteBufs into Unpooled
- e.g. Unpooled.messageBuffer()
- It will make much more sense once we introduce pooling:
  - i.e. Pooled.buffer()
2012-06-11 17:02:29 +09:00
Trustin Lee
a849d11877 ChannelBuffers -> ByteBufs / Add MessageBuf & ChannelBuf
- Add MessageBuf which replaces java.util.Queue
- Add ChannelBuf which is common type of ByteBuf and ChannelBuf
- ChannelBuffers was renamed to ByteBufs
- Add MessageBufs
- All these changes are going to replace ChannelBufferHolder.
2012-06-10 11:31:39 +09:00
Trustin Lee
5164d91255 Rename ChannelBuffer to ByteBuf as discussed before
- ChannelBuffer gives a perception that it's a buffer of a
  channel, but channel's buffer is now a byte buffer or a message
  buffer.  Therefore letting it be as is is going to be confusing.
2012-06-10 11:08:43 +09:00
Trustin Lee
87f52aa604 Ensure that a user implements flush() or inboundBufferUpdated()
- Also prohibited a user from overriding
  ChannelInbound(Byte|Message)HandlerAdapter.  If a user wants to do
  that, he or she should extend ChannelInboundHandlerAdapter instead.
2012-06-10 10:48:11 +09:00
Trustin Lee
e376888d48 Replace 'Stream' with 'Byte'
- In computing, 'stream' means both byte stream and message stream,
  which is confusing.
- Also, we were already mixing stream and byte in some places and
  it's better use the terms consistently.
  (e.g. inboundByteBuffer & inbound stream)
2012-06-09 21:05:59 +09:00
Trustin Lee
5661bff062 Rename SocketAddresses to NetworkConstants 2012-06-09 08:44:56 +09:00
Trustin Lee
50fafdc3d3 Rewrite SslHandler / Reduce the chance of OIO-OIO dead lock
- SslHandler always begins handshake unless startTls is true
  - Removed issueHandshake property
  - If a user wants to start handshake later, he/she has to add 
    SslHandler later.
- Removed enableRenegotiation property
  - JDK upgrade fixes the security vulnerability - no need to complicate
    our code
- Some property name changes
  - getSSLEngineInboundCloseFuture() -> sslCloseFuture() 
- Updated securechat example
- Added timeout for handshake and close_notify for better security
  - However, it's currently hard-coded.  Will make it a property later.
2012-06-08 01:22:35 +09:00
Trustin Lee
7bc10f2eba Replace codec embedder with EmbeddedChannel which can test any handlers
- Added EventExecutor.inEventLoop(Thread) and replaced executor identity
  comparison in DefaultChannelPipeline with it - more elegant IMO
- Removed the test classes that needs rewrite or is of no use
2012-06-07 19:39:37 +09:00
Trustin Lee
5e93d206ff Overhaul - Split ChannelHandler & Merge ChannelHandlerContext
- Extracted some handler methods from ChannelInboundHandler into
  ChannelStateHandler
- Extracted some handler methods from ChannelOutboundHandler into
  ChannelOperationHandler
- Moved exceptionCaught and userEventTriggered are now in
  ChannelHandler
  
- Channel(Inbound|Outbound)HandlerContext is merged into
  ChannelHandlerContext
- ChannelHandlerContext adds direct access methods for inboud and
  outbound buffers
  - The use of ChannelBufferHolder is minimal now.
    - Before: inbound().byteBuffer()
    - After: inboundByteBuffer()
    - Simpler and better performance
    
- Bypass buffer types were removed because it just does not work at all
  with the thread model.
  - All handlers that uses a bypass buffer are broken.  Will fix soon.

- CombinedHandlerAdapter does not make sense anymore either because
  there are four handler interfaces to consider and often the two
  handlers will implement the same handler interface such as
  ChannelStateHandler.  Thinking of better ways to provide this feature
2012-06-07 14:52:33 +09:00
Trustin Lee
a9cc75dd3e Port SSL echo test
- Remove britspaces
2012-06-06 23:18:37 +09:00
Trustin Lee
1eced1e9e3 Update license headers 2012-06-04 13:31:44 -07:00
Trustin Lee
bde9b6aa2a Remove the OIO-OIO test cases 2012-06-03 19:13:10 -07:00
Trustin Lee
361cb417e0 Move SPDY echo tests to testsuite to use AbstractSocketTest
- Moved MIN_VERSION and MAX_VERSION to SpdyConstants to allow public
  access
- Removed the tests that are not necessary anymore.
2012-06-03 04:47:05 -07:00
Trustin Lee
a94916da66 Remove unnecessary test cases 2012-06-03 03:12:55 -07:00
Trustin Lee
9abc88583c Fix DatagramMulticastTest failure
- Also:
  - Unwrap InvocationTargetException
2012-06-03 03:11:56 -07:00
Trustin Lee
ada61d4985 Ported multicast test / Fixed bugs in NioDatagramChannelConfig 2012-06-03 02:57:52 -07:00
Trustin Lee
e6ceb91a85 Add AbstractDatagramTest / Port unicast test / Ignore 'Socket closed' 2012-06-03 02:40:58 -07:00
Trustin Lee
49ef5672be Better naming / Port socket object echo test 2012-06-03 02:16:49 -07:00
Trustin Lee
7f96221fe9 Fix SocketStringEchoTest 2012-06-03 02:02:44 -07:00
Trustin Lee
7b8024373d Remove unnecessary test cases thanks to AbstractSocketTest 2012-06-03 01:56:34 -07:00
Trustin Lee
955c89fcf1 Add SocketEchoTest that will simplify a lot of socket testing
- SocketTestCombination generates all possible test combinations of
  socket transports.
- SocketEchoTest iterates over the combinations and runs all tests
  using reflection.
2012-06-03 01:52:39 -07:00
Trustin Lee
e241b3d6a2 Move tests to the appropriate packages / Remove unnecessary tests 2012-06-02 23:28:17 -07:00
Trustin Lee
734d452be2 Apply missing changes in the branch '3' 2012-05-31 11:50:08 -07:00
Trustin Lee
6288e02a9a System.out.println -> InternalLogger
- Remove unnecessary output, too
2012-05-30 15:44:21 -07:00
Trustin Lee
92a688e5b2 Retrofit the codec framework with the new API (in progress)
- Replaced FrameDecoder and OneToOne(Encoder|Decoder) with:
  - (Stream|Message)To(String|Message)(Encoder|Decoder)
- Moved the classes in 'codec.frame' up to 'codec'
- Fixed some bugs found while running unit tests
2012-05-16 23:02:06 +09:00
Trustin Lee
368156f5d0 Another round of the new API design
- Channel now creates a ChannelPipeline by itself

  I find no reason to allow a user to use one's own pipeline
  implementation since I saw nobody does except for the cases where a
  user wants to add a user attribute to a channel, which is now covered
  by AttributeMap.

- Removed ChannelEvent and its subtypes because they are replaced by
  direct method invocation.
- Replaced ChannelSink with Channel.unsafe()
- Various getter renaming (e.g. Channel.getId() -> Channel.id())
- Added ChannelHandlerInvoker interface
- Implemented AbstractChannel and AbstractServerChannel
- Some other changes I don't remember
2012-05-01 17:19:41 +09:00
norman
4c0a5886ca Make sure multicast tests pass on all os'es 2012-04-11 10:54:14 +02:00
norman
5434bd9645 Add missing license header 2012-04-10 10:05:33 +02:00
norman
f3456ce098 Make sure multicast tests pass on all os'es 2012-04-10 08:20:58 +02:00
norman
32f61ed01a Fix a NPE in a testcase when running via ubuntu 2012-04-10 08:19:16 +02:00
norman
d66cf2cbfa Add missing license header 2012-04-03 12:06:09 +02:00
norman
805270c5d9 Finish support for UDP Multicast in UDP. See #216 2012-04-03 12:04:33 +02:00
norman
31e3530252 Fix typo 2012-04-03 07:50:15 +02:00
Norman Maurer
9c1f3c6fe8 Fix UDP nio impl and add simple tests 2012-04-02 21:02:41 +02:00
Trustin Lee
fd0b0a4e2b Code cleanup 2012-03-30 12:48:28 +09:00
norman
77e1ef72cd Re-enable ssl tests. See #240 2012-03-29 12:06:00 +02:00
Norman Maurer
60d9364604 First round of remove the boss-thread. See #240 2012-03-28 20:19:39 +02:00
norman
479def20bd Check if logging level is enabled before log. See #192 2012-02-17 10:37:41 +01:00
Trustin Lee
783a7e5f9a Fix all remaining checkstyle violations 2012-01-15 02:08:31 +09:00
Trustin Lee
303c1b5f79 Overall cleanup / Add lost old jzlib headers 2012-01-13 17:41:18 +09:00
Trustin Lee
ebfc4513e0 Apply checkstyle to the build
Please note that the build will fail at the moment due to various checkstyle
violations which should be fixed soon
2012-01-11 20:16:14 +09:00
Trustin Lee
8663716d38 Issue #60: Make the project multi-module
Split the project into the following modules:
* common
* buffer
* codec
* codec-http
* transport
* transport-*
* handler
* example
* testsuite (integration tests that involve 2+ modules)
* all (does nothing yet, but will make it generate netty.jar)

This commit also fixes the compilation errors with transport-sctp on
non-Linux systems.  It will at least compile without complaints.
2011-12-28 19:44:04 +09:00