Norman Maurer
4e77bacdf7
[ #873 ] [ #868 ] Split ChannelFuture into ChannelFuture and ChannelPromise
2012-12-31 23:27:16 +09:00
Norman Maurer
2ea45950f1
Javadoc fixes
2012-12-23 23:03:54 +01:00
Veebs
92f1a81f47
#751 - Added support for legacy websocket v7 in order to pass SocksJS tests
2012-12-19 12:35:56 +01:00
Trustin Lee
eb23c9d27c
Add missing 'operation(args, future)' for 'operation(args)'
...
- Fixes #818
- Fix inspector warnings
2012-12-14 19:42:58 +09:00
Veebs
0c5fd38eb6
#722 - Make WebSocketClientHandshakerFactory a static utility class
2012-12-13 07:34:05 +01:00
Veebs
2704efc056
Added documentation to websocket classes.
2012-12-13 07:13:46 +01:00
Norman Maurer
312810d415
[ #795 ] Fix WebSocketClientHandshaker13 and WebSocketClientHandshaker08 finishHandshake() method.
2012-12-07 20:14:11 +01:00
Trustin Lee
33c0c89fef
Remove unnecessary empty lines
2012-12-03 19:58:13 +09:00
Norman Maurer
717bde05e2
[786] Fix possible corruption of first WebSocketFrame caused by WebSocketServerHandshaker*
2012-12-02 19:55:45 +01:00
Mike Heath
ff14feeb54
The handshake handler should not handle the exception and simply close the socket. The exception should be propagated to the WebSocketServerProtocolHandler to send the appropriate response and then close the socket.
2012-11-20 10:00:28 +01:00
Norman Maurer
d28eca7138
[ #740 ] Fix WebSocketClientHandshaker00.finishHandshake() validations
2012-11-15 13:06:48 +01:00
Norman Maurer
46d713970b
[ #737 ] WebSocketClientHandshaker00 should set Content-Length header do workaround problem with proxy
2012-11-14 10:08:44 +01:00
Norman Maurer
3b729848dc
[ #735 ] Improve the notification of the handshake future
2012-11-13 20:05:54 +01:00
Norman Maurer
efaa5c2ff5
[ #735 ] Make sure the handshake ChannelFuture is notified after the right encoder is present in the ChannelPipeline
2012-11-13 09:26:32 +01:00
Norman Maurer
2d5028bfd6
[ #729 ] Correctly handle urls with empty abs_path in it when issue the websocket handshake
2012-11-12 15:29:02 +01:00
Trustin Lee
a05064d3eb
Fix more inspection warnings + compilation errors
2012-11-12 13:25:00 +09:00
Trustin Lee
15642f2cd8
Do not call static methods via instances
2012-11-12 11:23:06 +09:00
Trustin Lee
4dce19b814
Replace a variable with a constant wherever possible
2012-11-12 09:43:14 +09:00
Trustin Lee
aa7cd691df
Remove redundant 'else' branches.
2012-11-12 09:31:40 +09:00
Trustin Lee
61d872d6e2
Suppress false-positive inspection warnings /
2012-11-12 09:05:16 +09:00
Trustin Lee
b4f796c5e3
Use 'x' over "x" wherever possible / String.equals("") -> isEmpty()
2012-11-10 08:03:52 +09:00
Trustin Lee
05c416b674
Add 'static' modifier to the methods that don't need to be member methods
2012-11-10 07:54:33 +09:00
Trustin Lee
5a4b2ec07e
Replace keySet() + unnecessary map lookup with entrySet()
2012-11-10 07:36:42 +09:00
Trustin Lee
4e0f455e69
Remove methods overridden but identical with the super implementation / Make constructors of abstract classes protected rather than non-sense public
...
AbstractWrappedByteBuf.capacity(int) should raise a UnsupportedOperationException rather than ReadOnlyBufferException.
2012-11-10 07:10:30 +09:00
Trustin Lee
d6a0fe54fd
Remove unnecessary throws clauses for unchecked exceptions
2012-11-10 07:07:37 +09:00
Trustin Lee
b8f5ef0423
Remove unnecessary null check before equals()
2012-11-10 01:34:39 +09:00
Trustin Lee
58ba0de659
Remove unnecessarily qualified static access
2012-11-10 01:32:21 +09:00
Trustin Lee
bbcb035246
Prefer isEmpty() over size() == 0 or length() == 0
2012-11-10 01:24:04 +09:00
Trustin Lee
e21dc5925d
Replace dynamic regular expressions with precompiled Patterns or new StringUtil.split()
2012-11-10 00:41:22 +09:00
Norman Maurer
e726ff63d9
Cleanup
2012-10-29 20:21:38 +01:00
Trustin Lee
a6c4f651a7
[ #661 ] WebSocketClientHandshaker is broken.
...
- Remove HttpRequestEncoder after handshaking is complete
- Fix a bug in the WebSocket client example where it sends a frame even before handshake is complete
2012-10-16 14:40:39 -07:00
Trustin Lee
a156f67804
[ #624 ] Add varargs constructor to MessageToByteEncoder, MessageToMessage(Encoder|Decoder|Codec) to implement default isEncodable/isDecodable()
...
.. and modify all their subtypes to take advantage of this improvement.
2012-09-23 17:01:31 +09:00
norman
8ab1ef1432
Fix checkstyle
2012-09-10 12:10:24 +02:00
norman
0233a3dd63
Close the channel after the response was written to the client on a WebSocketHandshakeException. See #587
2012-09-10 07:22:35 +02:00
norman
6c2053bae5
Check if WebSocketServerProtocolHandshakeHandler is already in the pipeline before adding it. See #587
2012-09-10 07:18:26 +02:00
norman
6e39192462
Rename WebSocketServerHandshakeHandler to WebSocketServerProtocolHnadshakeHandler and also make it public. See #587
2012-09-10 07:15:59 +02:00
Norman Maurer
4353aa6794
Use Secure websockets if SslHandler is present in the ChannelPipeline. See #587
2012-09-09 19:48:53 +02:00
Norman Maurer
bd557a6330
Remove not necessary try / catch block. See #587
2012-09-09 19:35:56 +02:00
Jeff Smick
416c026efe
Upgrade client connection after completed response
2012-09-09 08:54:46 -07:00
Daniel Bevenius
150e8b4105
WebSocket enhancements
...
- Refactoring and adding suggestions from Norman and Vibul.
2012-09-09 08:30:40 +02:00
Norman Maurer
c6436ad470
Also move the replacement of the decoder to the ChannelFutureListener for the websocket upgrade. See #586
2012-09-09 08:21:32 +02:00
Jeff Smick
90d15c4627
Upgrade connection after completed response
...
Channel handlers above the HttpEncoder may delay the repsonse being
written to the socket. We need to wait for the response to complete
before upgrading the pipeline.
2012-09-08 20:54:43 -07:00
Frédéric Brégier
e36c4c77bf
fix header to out
2012-07-18 11:50:28 +03:00
Frédéric Brégier
56a72c6456
writesBytes as in V3 instead of writeInt (RFC says 0 to 4 bytes)
2012-07-18 11:46:56 +03:00
Frédéric Brégier
92334b919e
Fix for issue #456 related to payload using 2 differents RANDOM while only one should be used
2012-07-18 11:43:36 +03: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
d0c8c10681
Merge pull request #420 from Massive-Dynamics/fix-failed-javadoc
...
Fixes a bit of javadoc that was broken by a failed merge
2012-06-28 23:51:05 -07:00
Cruz Julian Bishop
9f9b36f579
Redid documentation for WebSocketUtil
2012-06-29 15:12:59 +10:00
Cruz Julian Bishop
be57cf3b51
Fixes a bit of javadoc that was broken by a failed merge
2012-06-29 15:03:41 +10: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
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
468a3228a4
Fit every line into 120 columns
2012-06-08 19:28:12 +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
1eced1e9e3
Update license headers
2012-06-04 13:31:44 -07:00
Trustin Lee
77274ae743
Automated code clean-up
2012-05-31 12:03:01 -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
743596aaea
Fix a bug where first websocket frame is discarded ( #332 )
2012-05-30 19:18:08 -07:00
Trustin Lee
a5a76131e6
Fix checkstyle errors
2012-05-30 19:09:23 -07:00
vibul
4fc089829d
Fixed bug where subprotocol not sent by client
...
Conflicts:
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker08.java
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker13.java
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java
2012-05-30 19:07:44 -07:00
Trustin Lee
92f010d688
Use int instead of long for maxFramePayloadLength
2012-05-30 17:21:51 -07:00
Trustin Lee
67ee22e23a
Add max frame length for web socket to limit chance of DOS attack ( #283 )
...
- Contributed by @veebs
2012-05-30 17:13:00 -07:00
Trustin Lee
ec43aa121f
Case-insensitive matching for Upgrade and Connection header ( #278 )
2012-05-30 16:43:04 -07:00
Trustin Lee
c7004ed142
Use Sec-WebSocket-Origin instead of Origin ( #264 )
...
- Contributed by @normanmaurer
2012-05-30 16:04:34 -07:00
Trustin Lee
367895f660
Add port to Origin if the port is non default (80/443). ( #262 )
2012-05-30 16:00:40 -07:00
Trustin Lee
7e94632d41
Add port to 'Origin' if the port is non default (80/443) ( #262 )
...
- Contributed by @normanmaurer
2012-05-30 15:57:39 -07:00
Trustin Lee
b10cf29393
Add isDecodable/isEncodable() to codecs to support stacked codecs
2012-05-29 13:34:01 -07:00
Trustin Lee
c883b61503
Ported codec-http to the new API
...
- Added ChannelBufferHolders.catchAllBuffer()
- Relaxed UnsupportedMessageTypeException constructor signature
- EmbeddedChannel now uses the catchAllBuffer
- ChanelInboundMessageHandlerAdapter.messageReceive() throws Exception
- Added ChannelInboundStreamHandlerAdapter
2012-05-23 11:42:10 -07:00
Trustin Lee
251a18160c
Move VoidEnum to util
2012-05-18 14:34:42 +09:00
Trustin Lee
1bf0dfe64a
Retrofit ReplayingDecoder with the new API
...
- Moved up to 'codec' from 'codec.replay'
- Test passes with Redis client codec
2012-05-17 12:37:37 +09: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
vibul
91dc8efd4b
Issue #250 . Implement web socket close frame status code and reason text.
2012-04-10 08:15:24 +02:00
Dennis Boldt
b3cc305578
Organized imports.
2012-02-21 03:06:26 +01:00
Trustin Lee
3b31daf8a3
Fix missing copyright headers
2012-02-07 17:26:55 +09:00
Carl Byström
f7a4a646f8
Don't require HttpChunkAggregator to be present in pipeline for Web Sockets.
2012-02-04 16:59:04 +01:00
Trustin Lee
c1aa8b4c7b
Clean up the new WebSocket package
2012-01-19 13:12:45 +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