Lines Matching refs:code
2 // Use of this source code is governed by a BSD-style license that can be
133 // used in one code path and should not leak into the code in general.
190 void WebSocketChannel::StartClosingHandshake(uint16 code,
201 // TODO(ricea): Validate |code|? Check that |reason| is valid UTF-8?
203 SendClose(code, reason); // Sets state_ to SEND_CLOSED
360 uint16 code = kWebSocketErrorAbnormalClosure;
363 code = closing_code_;
366 event_interface_->OnDropChannel(code, reason);
549 uint16 code = kWebSocketNormalClosure;
551 ParseClose(data_buffer, &code, &reason);
554 VLOG(1) << "Got Close with code " << code;
558 SendClose(code, reason); // Sets state_ to CLOSE_WAIT
560 closing_code_ = code;
567 // will see the status code sent by the other end as _The WebSocket
569 closing_code_ = code;
617 uint16 code,
627 send_code = code;
641 event_interface_->OnDropChannel(code, reason);
645 void WebSocketChannel::SendClose(uint16 code, const std::string& reason) {
649 if (code == kWebSocketErrorNoStatusReceived) {
656 WriteBigEndian(body->data(), code);
657 COMPILE_ASSERT(sizeof(code) == kWebSocketCloseCodeLength,
667 uint16* code,
673 *code = kWebSocketErrorNoStatusReceived;
689 *code = unchecked_code;
691 VLOG(1) << "Close frame contained code outside of the valid range: "
693 *code = kWebSocketErrorAbnormalClosure;