anchor.diff:      _outputStream = null;
     }
   
  +  _onWebSocketPing(List<int> payload) {
  +    _sendFrame(_WebSocketOpcode.PONG, payload);
  +  }
  +
  +  _onWebSocketPong(List<int> payload) {
  +    // Currently pong messages are ignored.
  +  }
  +
     _onWebSocketClosed(int status, String reason) {
       _closeReceived = true;
       if (_onClosed != null) _onClosed(status, reason);
  
positive.code:               break;
  
              case _WebSocketOpcode.CLOSE:
                if (_currentMessageType != _WebSocketMessageType.NONE) {
                  throw new WebSocketException("Protocol error");
                }
                _currentMessageType = _WebSocketMessageType.CLOSE;
                break;
  
              case _WebSocketOpcode.PING:
                // TODO(sgjesse): Handle ping.
                throw new UnsupportedOperationException("Web socket PING");
                break;
  
              case _WebSocketOpcode.PONG:
                // TODO(sgjesse): Handle pong.
                throw new UnsupportedOperationException("Web socket PONG");
                break;
  
              default:
  
negative.code:               }
              }
  
              if (_isControlFrame()) {
                if (payload > 0) {
                  // Allocate a buffer for collecting the control frame
                  // payload if any.
                  if (_controlPayload == null) {
                    _controlPayload = new List<int>();
                  }
                  _controlPayload.addAll(buffer.getRange(index, payload));
                  index += payload;
                }
  
                if (_remainingPayloadBytes == 0) {
                  _controlFrameEnd();
                }
              } else {
                switch (_currentMessageType) {
                  case _WebSocketMessageType.NONE:
                    throw new WebSocketException("Protocol error");
                    break;
  
                  case _WebSocketMessageType.TEXT:
                  case _WebSocketMessageType.BINARY:
                    if (onMessageData != null) {
                      onMessageData(buffer, index, payload);
                    }
                    index += payload;
                    if (_remainingPayloadBytes == 0) {
                      _messageFrameEnd();
                    }
                    break;
  
                  default:
                    throw new WebSocketException("Protocol error");
                    break;
  
                }
              }
  
              // Hack - as we always do index++ below.
              index--;
          }
  
          // Move to the next byte.
  