Index: net/websockets/websocket_channel.h |
diff --git a/net/websockets/websocket_channel.h b/net/websockets/websocket_channel.h |
index 64cf91defeca5b150ce942aab4778d84b1e0f899..8f07430a76a4e06f8963089878c11a7262ba6e2f 100644 |
--- a/net/websockets/websocket_channel.h |
+++ b/net/websockets/websocket_channel.h |
@@ -187,17 +187,22 @@ class NET_EXPORT WebSocketChannel { |
// within the ReadFrames() loop and does not need to call ReadFrames() itself. |
ChannelState OnReadDone(bool synchronous, int result) WARN_UNUSED_RESULT; |
- // Processes a single frame that has been read from the stream. |
- ChannelState ProcessFrame( |
+ // Handles a single frame that the object has received enough of to process. |
+ // May call |event_interface_| methods, send responses to the server, and |
+ // change the value of |state_|. |
+ // |
+ // The top half of this method validates the masked bit and consistency |
+ // between FIN bit and opcode. The bottom half is implemented by the |
+ // HandleFrameBottomHalf() method below. |
+ ChannelState HandleFrame( |
scoped_ptr<WebSocketFrame> frame) WARN_UNUSED_RESULT; |
- // Handles a frame that the object has received enough of to process. May call |
- // |event_interface_| methods, send responses to the server, and change the |
- // value of |state_|. |
- ChannelState HandleFrame(const WebSocketFrameHeader::OpCode opcode, |
- bool final, |
- const scoped_refptr<IOBuffer>& data_buffer, |
- size_t size) WARN_UNUSED_RESULT; |
+ // Implements bottom half of HandleFrame() method. |
+ ChannelState HandleFrameBottomHalf( |
Adam Rice
2014/02/10 12:00:28
"BottomHalf" implies that it's just an arbitrary s
tyoshino (SeeGerritForStatus)
2014/02/12 02:31:25
Oh, got it!
|
+ const WebSocketFrameHeader::OpCode opcode, |
+ bool final, |
+ const scoped_refptr<IOBuffer>& data_buffer, |
+ size_t size) WARN_UNUSED_RESULT; |
// Low-level method to send a single frame. Used for both data and control |
// frames. Either sends the frame immediately or buffers it to be scheduled |
@@ -298,8 +303,8 @@ class NET_EXPORT WebSocketChannel { |
// Storage for the status code and reason from the time the Close frame |
// arrives until the connection is closed and they are passed to |
// OnDropChannel(). |
- uint16 closing_code_; |
- std::string closing_reason_; |
+ uint16 received_close_code_; |
Adam Rice
2014/02/10 12:00:28
This rename is good.
|
+ std::string received_close_reason_; |
// The current state of the channel. Mainly used for sanity checking, but also |
// used to track the close state. |