Trustin Lee
a8bc720977
Fixed buffer leaks in LoggingHandlerTest
2014-02-13 17:03:21 -08:00
Trustin Lee
3d874f0bd7
Improve documentation for the two-args formatter in LoggingHandler
2014-02-13 16:51:26 -08:00
Trustin Lee
fbed62249c
Rename formatUserMessage to formatSimple and use it in two-args formatter in LoggingHandler
2014-02-13 16:51:15 -08:00
Trustin Lee
a9150ee7d6
Simplify two-args message formatter in LoggingHandler
2014-02-13 16:51:06 -08:00
Trustin Lee
2e58497160
Make LoggingHandler.appendHexDump(..) protected for the subclasses
2014-02-13 16:50:50 -08:00
Trustin Lee
835b4443f3
Optimize and clean up LoggingHandler
...
- Use ': ' instead of '(...)' for simpler string concatenation and prettier presentation
- Optimize the overall performance of format*() methods
- All format*() methods are now expected to encode the channel information by themselves so that StringBuilder instances are created less often.
- Use a look-up table for generating per-row prefixes
- Hid formatByteBuf(), formatByteBufHolder(), and formatNonByteBuf() from user because a user can always override format(ctx, eventName, arg). For example, to disable hexdump:
protected void format(ChannelHandlerContext ctx, String eventName, Object arg) {
if (arg instanceof ByteBuf) {
super.format(ctx, eventName, arg.toString());
} else {
super.format(ctx, eventName, arg);
}
}
2014-02-13 16:50:31 -08:00
Trustin Lee
499033d44f
Add a shortcut method for collision-free naming
2014-02-13 15:17:09 -08:00
Trustin Lee
c4c71e6d28
Fix the potential copyright issue in SocksCommonUtils
...
- Add StringUtil.toHexString() methods which are based on LoggingHandler's lookup table implementation, and use it wherever possible
2014-02-06 15:00:06 -08:00
Norman Maurer
37e6588845
[ #2159 ] Not fail the ChannelPromise with WriteTimeoutException to prevent warning
2014-01-30 07:02:06 +01:00
Trustin Lee
bc21443ea9
Fix a regression in SslHandler where delegated tasks run in a different executor makes the session hang
...
- Fixes #2098
- Deprecate specifying an alternative Executor for delegated tasks for SslHandler
2014-01-09 18:08:05 +09:00
Trustin Lee
f7a3881536
Fix a bug in SslHandler where a ClassCastException is raised when non-ByteBuf message is passed
...
- Fixes #1828
2013-12-16 16:30:41 +09:00
Norman Maurer
b3d8c81557
Fix all leaks reported during tests
...
- One notable leak is from WebSocketFrameAggregator
- All other leaks are from tests
2013-12-07 00:44:56 +09:00
Norman Maurer
7c7acdcaac
[ #2033 ] Correctly handle adding of IdleStateHandler after Channel was already active and registered
2013-12-03 13:56:43 +01:00
Alex Petrov
90309f9065
Improve doc of IdleStateHandler according to example given in UptimeClientHandler (L57)
2013-11-20 10:24:33 +01:00
Trustin Lee
b65b4199dc
Fix regression introduced by 4c7fa950cc
...
- Some promises were not fulfilled when SSLEngine produces 0 bytes.
2013-11-14 15:09:20 +09:00
Trustin Lee
11f95c78e2
Optimize SslHandler
...
- Fixes #1905
- Call ctx.flush() only when necessary
- Improve the estimation of application and packet buffer sizes
- decode() method now tries to call unwrap() with as many SSL records as
possible to reduce the number of events triggered
2013-11-08 17:41:16 +09:00
Trustin Lee
51ca4f3e91
Fix a bug where SslHandler doesn't sometimes handle renegotiation correctly
...
- Fixes #1964
2013-11-04 16:54:13 +09:00
Trustin Lee
1c2352e6a0
Replace constructor calls on UniqueName and its subtypes with valueOf() wherever possible
2013-10-25 20:58:53 +09:00
Norman Maurer
79562d5891
[ #1936 ] Fix example in javadoc
2013-10-20 09:32:38 +02:00
Norman Maurer
bcdb3e88d8
[ #1934 ] Correctly log handshake errors and not print them to STDERR
2013-10-18 17:39:04 +02:00
Norman Maurer
beda02fad0
[ #1898 ] No call fireExceptionCaught but just fail the write promise
2013-10-08 10:02:50 +02:00
Norman Maurer
c5f6760c68
[ #1895 ] Fix IllegalStateException which was produced during failing ChunkedWrite after the channel was closed
2013-10-08 06:40:43 +02:00
Norman Maurer
cf4d25823c
Propagate channelWritabilityChanged() through the pipeline after flushing. Related to [ #1861 ]
2013-09-24 14:05:25 +02:00
Norman Maurer
ef936a6d41
Correctly handle automatically suspend/resume in ChunkedWriteHandler. Related to [ #1861 ]
...
The old implementation was broken and could lead to pending message never be picked up again until the user either explicit called flush or
resumeTransfer().
2013-09-24 13:57:51 +02:00
Norman Maurer
29d34c672c
[ #1855 ] Try to calculate the correct amount of written bytes to update the ChannelProgressiveFuture
2013-09-24 07:49:26 +02:00
Trustin Lee
ad0c456209
Ensure operationProgressed is invoked even on completion
...
- Fixes #1809
2013-09-05 18:37:14 +09:00
Norman Maurer
9e7529b2f5
[ #1743 ] Fix IllegalStateException by remove usage of PendingWrite in ChunkedWriteHandler. This needs more thoughts before re-introduce it
2013-08-16 08:11:19 +02:00
Norman Maurer
48eb73f9b1
[ #1733 ] Correctly pass the promise to the ctx.write(...) in AbstractTrafficShapingHandler
2013-08-13 08:21:26 +02:00
Norman Maurer
f8f19d1539
[ #1732 ] Fix bug which lead ChannelTrafficShapingHandler stop to work after first Channel was disconnected
2013-08-13 08:09:59 +02:00
Norman Maurer
8af5ea8d4f
[ #1658 ] Allow to use AbstractTrafficShapingHandler also with ByteBufHolder based messages
2013-08-10 20:25:35 +02:00
Norman Maurer
c1d787bff7
[ #1722 ] ChunkedWriteHandler.doFlush(...) should not call fireExceptionCaught(..)
2013-08-09 21:32:17 +02:00
Norman Maurer
72395bf400
[ #1719 ] Make sure PendingWrite is only recycled once in ChunkedWriteHandler
2013-08-09 18:44:58 +02:00
Norman Maurer
56646920c0
Formatting
2013-07-29 20:59:45 +02:00
Norman Maurer
9da81acec1
[ #1657 ] Log content of ByteBufHolder
2013-07-29 20:57:33 +02:00
Norman Maurer
00f1533fa9
[ #1671 ] Fix bug in ChunkedWriteHandler which produce a NPE on empty chunks
2013-07-29 16:23:43 +02:00
Norman Maurer
0cb3541b53
[ #1669 ] Correctly notify the ChannelPromise of delayed writes
2013-07-29 08:13:29 +02:00
Norman Maurer
5e703e7419
[ #1658 ] Let trafficshaping work with ByteBuf and ByteBufHolder out of the box
2013-07-29 07:31:09 +02:00
Frédéric Brégier
61b1214b24
Fix for first issue from #1652 on computation of time to wait in AbstractTrafficShapingHandler for Netty 4
...
Fix for first issue from #1652 on computation of time to wait in AbstractTrafficShapingHandler for Netty 4, using the same formula than in Netty 3 (wrong place for parenthese).
Was:
(bytes * 1000 / limit - interval / 10) * 10;
Becomes:
(bytes * 1000 / limit - interval) / 10 * 10;
2013-07-26 15:24:31 +02:00
Norman Maurer
2b3ac3d446
Factor out the PendingWrite class and put it in internal package. Make use of it in SslHandler and ChunkedWriteHandler to reduce GC-pressure
2013-07-25 12:36:24 +02:00
Norman Maurer
fa4e15e198
Make PendingWrites recyclable to reduce GC pressure
2013-07-20 18:15:35 +02:00
Trustin Lee
4f6ba4fe3d
Use tryProgress just in case of user error
2013-07-19 13:30:33 +09:00
Trustin Lee
762adfcb69
Update HttpStaticFileServer example / Fix bugs related with progress notification
...
- Fix a bug in DefaultProgressivePromise.tryProgress() where the notification is dropped
- Fix a bug in AbstractChannel.calculateMessageSize() where FileRegion is not counted
- HttpStaticFileServer example now uses zero copy file transfer if possible.
2013-07-19 13:21:32 +09:00
Trustin Lee
f96a8e5951
Implement ProgressivePromise notification in NIO byte channels and ChunkedWriteHandler
...
- Refine the contract of GenericProgressiveFutureListener.
- Negative 'total' now means 'unknown', which is useful for ChunkedWriteHandler.
2013-07-19 12:53:23 +09:00
Trustin Lee
6791984146
Remove unnecessary code from SslHandler
...
- Remove CloseNotifyListener which was used only to reduce the noisy logging.
- Instead, simply do a string match.
- Fixes #1608
2013-07-19 09:24:19 +09:00
Norman Maurer
def3dbe035
Add missing closing paren
2013-07-16 07:39:33 +02:00
Norman Maurer
a215ba6ef6
Some javadocs
2013-07-12 15:45:09 +02:00
Norman Maurer
023201f684
[ #1570 ] ChunkedWriteHandler.discard(..) must not call fireExceptionCaught(...)
2013-07-12 10:58:38 +02:00
Norman Maurer
1a7d1f7023
[ #1568 ] Fix problem where an exception was fired after the channel was closed.
...
* Calling fireExceptionCaught(...) in this case was not correct as we failed writes which are outbound operations.
2013-07-12 10:42:39 +02:00
Jeff Pinner
be963d4caf
rewrite SslHandler's flush0 message to match docs
2013-07-12 07:18:47 +02:00
Jeff Pinner
c77ab7d092
Fix a NoSuchElementException and out-of-order event problem caused by SslHandler
...
The fix prevents from reentering channelRead incorrectly. It also
prevents from getting the inbound requests out of order.
2013-07-12 09:51:28 +09:00