Commit Graph

685 Commits

Author SHA1 Message Date
Trustin Lee
cb718a07c8 Move ChannelFutureFactory.newVoidFuture() to Channel.Unsafe() / Cleanup 2012-05-11 00:57:42 +09:00
Trustin Lee
da9ecadfc0 Introduce bypass buffer and use it in LoggingHandler
- Added ChannelBufferHolders.(inbound|outbound)BypassBuffer()
  - The holder returned by these methods returns the next handler's
    buffer.  When a handler's new(Inbound|Outbound)Buffer returns
    a bypass holder, your inboundBufferUpdated() and flush()
    implementation should check if the buffer is a bypass and should not
    modify the content of the buffer.
- Channel(Inbound|Outbound)?HandlerAdapter is now abstract.
  - A user has to specify the exact inbound/outbound buffer type
  - It's because there's no way to determine the best buffer type
- Implemented LoggingHandler using the new API.
  - It doesn't dump received or sent messages yet.
- Fixed a bug where DefaultUnsafe.close() does not trigger deregister()
- Fixed a bug where NioSocketChannel.isActive() does not return false
  when closed
2012-05-10 23:19:59 +09:00
Trustin Lee
b4764f6164 Fix infinity loop and timing issues
- Made sure unnecessary interestOps are not OR'd
- Fixed a bug where DefaultChannelFuture.rethrowIfFailed() returns
  silently if the future is not done yet - there's no ways to tell
  the differences between failure and incompleteness.
2012-05-09 23:42:01 +09:00
Trustin Lee
129a2af86a Initial working version of the echo server example
- Optimized AbstractChannelBuffer.discardReadBytes()
- Split ChannelHandlerInvoker into ChannelInboundInvoker and
  ChannelOutboundInvoker
  - Channel implements ChannelOutboundInvoker
  - ChannelOutboundInvoker.nextOut() is now out()
  - ChannelOutboundHandlerContext.out() is now prevOut()
  - Added the outbound operations without future
    parameter to ChannelOutboundInvoker for user convenience
- All async operations which requires a ChannelFuture as a parameter
  now returns ChannelFuture for user convenience
- Added ChannelFutureFactory.newVoidFuture() to allow a user specify
  a dummy future that is of no use
  - I'm unsure if it is actually a good idea to introduce it. It might
    go away later.
- Made the contract of AbstractChannel.doXXX() much simpler and moved
  all common code up to AbstractChannel.DefaultUnsafe
- Added Channel.isOpen()
- Fixed a bug where MultithreadEventLoop always shut down its child
  event loops on construction
- Maybe more changes I don't remember :-)
2012-05-09 22:09: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
vibul
91dc8efd4b Issue #250. Implement web socket close frame status code and reason text. 2012-04-10 08:15:24 +02:00
norman
373c356067 Merge branch 'sctp_refactoring'
Conflicts:
	transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java
2012-04-02 11:02:54 +02:00
norman
a60eecaa0c Refactor sctp to share code with nio 2012-03-30 11:07:43 +02:00
Trustin Lee
070c92906d Add missing Redis client example 2012-03-30 17:05:18 +09:00
Trustin Lee
fd0b0a4e2b Code cleanup 2012-03-30 12:48:28 +09:00
Norman Maurer
73f3a45e97 Merge pull request #244 from netty/thread_model_refactor
Thread model refactoring, which remove the usage of a boss thread. See #240
2012-03-29 05:05:22 -07:00
Norman Maurer
60d9364604 First round of remove the boss-thread. See #240 2012-03-28 20:19:39 +02:00
vibul
64f5299452 Unless the Connection: keep-alive header is present in the HTTP response, apache benchmark (ab) hangs on keep alive connections.
This is as per HTTP 1.1 spec:  http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01.html#Connection
2012-03-28 15:50:17 +11:00
vibul
b56c17769c Retested Websockets with Autobahn v0.4.10. 2012-03-11 11:35:33 +11:00
vibul
afcd033123 Issue #222. Remove WebSocketHttpResponseDecoder hack. 2012-03-11 11:35:12 +11:00
Norman Maurer
480343e16e Remove unused imports 2012-03-03 19:34:15 +01:00
Trustin Lee
9e8f8ac08c Fix NPE in AbstractNioWorker / Uncomment setUseClientMode() 2012-03-01 14:27:32 -08:00
Trustin Lee
81ad99bc39 Remove logging which was added accidently 2012-02-29 14:05:44 -08:00
Dennis Boldt
b3cc305578 Organized imports. 2012-02-21 03:06:26 +01:00
Jestan Nirojan
20d7379c53 merge upstream master 2012-02-19 12:37:50 +05:30
norman
479def20bd Check if logging level is enabled before log. See #192 2012-02-17 10:37:41 +01:00
Norman Maurer
4636309597 Fix HttpSnoopClient. See #183 2012-02-12 12:36:04 +01:00
Jestan Nirojan
fe3a480fb9 1)renamed sctp payload to sctp frame 2)added sctp codec, handler classes 2012-02-11 19:16:55 +05:30
Trustin Lee
3b31daf8a3 Fix missing copyright headers 2012-02-07 17:26:55 +09:00
Trustin Lee
40ef4d2ccf Fix #153: Add ChannelFuture.rethrowIfFailed() 2012-01-19 13:33:37 +09:00
Trustin Lee
c1aa8b4c7b Clean up the new WebSocket package 2012-01-19 13:12:45 +09:00
Trustin Lee
783a7e5f9a Fix all remaining checkstyle violations 2012-01-15 02:08:31 +09:00
Trustin Lee
d40bd5e7f2 Rename IOStream example / Code cleanup 2012-01-15 00:43:28 +09:00
Trustin Lee
4cff6b56ff Rename HTTP upload example classes for disambiguation 2012-01-15 00:31:02 +09:00
Trustin Lee
b7cfc6b7f0 Rename HTTP snoop example classes for disambiguation 2012-01-15 00:28:25 +09:00
Trustin Lee
1b02743367 Overall code cleanup
* Fixes based on checkstyle feed back
* Simplify WebSocket client example (needs more work)
* Rename Autobahn test server classes
2012-01-15 00:17:20 +09:00
Trustin Lee
303c1b5f79 Overall cleanup / Add lost old jzlib headers 2012-01-13 17:41:18 +09:00
Trustin Lee
32dda06da3 Fix a compilation error 2012-01-11 20:19:01 +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