Lines Matching full:stream
51 // Always start at 1 for the first stream id.
241 base::WeakPtr<SpdyStream> stream;
242 int rv = session->TryCreateStream(this, &stream);
245 stream_ = stream;
258 base::WeakPtr<SpdyStream> stream = stream_;
259 DCHECK(stream.get());
261 return stream;
265 base::WeakPtr<SpdyStream>* stream) {
271 DCHECK(*stream);
272 stream_ = *stream;
297 : stream(NULL),
300 SpdySession::ActiveStreamInfo::ActiveStreamInfo(SpdyStream* stream)
301 : stream(stream),
302 waiting_for_syn_reply(stream->type() != SPDY_PUSH_STREAM) {}
525 base::WeakPtr<SpdyStream>* stream,
529 stream->reset();
539 *stream = GetActivePushStream(url);
540 if (*stream) {
548 // |in_io_loop_| set if a stream is being created in response to
560 "Tried to get SPDY stream for secure content over an unauthenticated "
569 base::WeakPtr<SpdyStream>* stream) {
586 return CreateStream(*request, stream);
596 base::WeakPtr<SpdyStream>* stream) {
622 "Tried to create SPDY stream for a closed socket connection.");
634 *stream = new_stream->GetWeakPtr();
749 const base::WeakPtr<SpdyStream>& stream,
756 EnqueueWrite(stream->priority(), frame_type, producer.Pass(), stream);
767 CHECK_EQ(it->second.stream->stream_id(), stream_id);
838 SpdyStream* stream = it->second.stream;
839 CHECK_EQ(stream->stream_id(), stream_id);
850 (stream->send_window_size() <= 0);
884 // Obey send window size of the stream if stream flow control is
888 stream->set_send_stalled_by_flow_control(true);
889 // Even though we're currently stalled only by the stream, we
891 QueueSendStalledStream(*stream);
898 effective_len = std::min(effective_len, stream->send_window_size());
905 stream->set_send_stalled_by_flow_control(true);
906 QueueSendStalledStream(*stream);
967 const base::WeakPtr<SpdyStream>& stream, int status) {
968 DCHECK_EQ(stream->stream_id(), 0u);
970 CreatedStreamSet::iterator it = created_streams_.find(stream.get());
1008 scoped_ptr<SpdyStream> owned_stream(it->second.stream);
1037 RequestPriority priority = it->second.stream->priority();
1040 // Removes any pending writes for the stream except for possibly an
1272 base::WeakPtr<SpdyStream> stream;
1273 if (!write_queue_.Dequeue(&frame_type, &producer, &stream)) {
1278 if (stream.get())
1279 DCHECK(!stream->IsClosed());
1281 // Activate the stream only when sending the SYN_STREAM frame to
1282 // guarantee monotonically-increasing stream IDs.
1284 if (stream.get() && stream->stream_id() == 0) {
1286 ActivateCreatedStream(stream.get());
1303 in_flight_write_stream_ = stream;
1350 // We only notify the stream when we've fully written the pending frame.
1352 // It is possible that the stream was cancelled while we were
1494 void SpdySession::LogAbandonedStream(SpdyStream* stream, Error status) {
1495 DCHECK(stream);
1497 "ABANDONED (stream_id=%d): ", stream->stream_id()) +
1498 stream->url().spec();
1499 stream->LogStreamError(status, description);
1501 // stream isn't active (i.e., it hasn't written anything to the wire
1509 LogAbandonedStream(it->second.stream, status);
1513 if (it->second.stream->type() == SPDY_PUSH_STREAM &&
1514 unclaimed_pushed_streams_.find(it->second.stream->url()) !=
1638 const base::WeakPtr<SpdyStream>& stream) {
1643 write_queue_.Enqueue(priority, frame_type, producer.Pass(), stream);
1655 void SpdySession::InsertCreatedStream(scoped_ptr<SpdyStream> stream) {
1656 DCHECK_EQ(stream->stream_id(), 0u);
1657 DCHECK(created_streams_.find(stream.get()) == created_streams_.end());
1658 created_streams_.insert(stream.release());
1661 scoped_ptr<SpdyStream> SpdySession::ActivateCreatedStream(SpdyStream* stream) {
1662 DCHECK_EQ(stream->stream_id(), 0u);
1663 DCHECK(created_streams_.find(stream) != created_streams_.end());
1664 stream->set_stream_id(GetNewStreamId());
1665 scoped_ptr<SpdyStream> owned_stream(stream);
1666 created_streams_.erase(stream);
1670 void SpdySession::InsertActivatedStream(scoped_ptr<SpdyStream> stream) {
1671 SpdyStreamId stream_id = stream->stream_id();
1675 std::make_pair(stream_id, ActiveStreamInfo(stream.get())));
1677 ignore_result(stream.release());
1683 void SpdySession::DeleteStream(scoped_ptr<SpdyStream> stream, int status) {
1684 if (in_flight_write_stream_.get() == stream.get()) {
1685 // If we're deleting the stream for the in-flight write, we still
1692 write_queue_.RemovePendingWritesForStream(stream->GetWeakPtr());
1694 // |stream->OnClose()| may end up closing |this|, so detect that.
1697 stream->OnClose(status);
1734 return active_it->second.stream->GetWeakPtr();
1783 // We still want to send a frame to reset the stream even if we
1811 // |unacked_recv_window_bytes_| properly even when the stream is
1831 // By the time data comes in, the stream may already be inactive.
1835 SpdyStream* stream = it->second.stream;
1836 CHECK_EQ(stream->stream_id(), stream_id);
1840 stream->LogStreamError(ERR_SPDY_PROTOCOL_ERROR, error);
1845 stream->OnDataReceived(buffer.Pass());
1912 SpdyStream* stream) {
1914 SpdyStreamId stream_id = stream->stream_id();
1915 // May invalidate |stream|.
1916 int rv = stream->OnInitialResponseHeadersReceived(
1950 LOG(WARNING) << "Received invalid OnSyn stream id " << stream_id;
1955 LOG(WARNING) << "Received OnSyn for active stream " << stream_id;
1973 "Received invalid OnSyn associated stream id %d for stream %d",
1989 "Pushed stream url was invalid: " + gurl.spec());
1993 // Verify we have a valid stream association.
2000 "Received OnSyn with inactive associated stream %d",
2005 // Check that the SYN advertises the same origin as its associated stream.
2018 GURL associated_url(associated_it->second.stream->GetUrlFromHeaders());
2023 "Rejected Cross Origin Push Stream %d",
2029 // There should not be an existing pushed stream with the same path.
2036 "Received duplicate pushed stream with url: " +
2041 scoped_ptr<SpdyStream> stream(
2047 stream->set_stream_id(stream_id);
2056 InsertActivatedStream(stream.Pass());
2067 recv_first_byte_time, active_it->second.stream) != OK)
2100 // CloseActiveStreamIterator() will remove the stream from
2130 // NOTE: it may just be that the stream was cancelled.
2134 SpdyStream* stream = it->second.stream;
2135 CHECK_EQ(stream->stream_id(), stream_id);
2139 "Received duplicate SYN_REPLY for stream.";
2140 stream->LogStreamError(ERR_SPDY_PROTOCOL_ERROR, error);
2147 headers, response_time, recv_first_byte_time, stream));
2168 // NOTE: it may just be that the stream was cancelled.
2169 LOG(WARNING) << "Received HEADERS for invalid stream " << stream_id;
2173 SpdyStream* stream = it->second.stream;
2174 CHECK_EQ(stream->stream_id(), stream_id);
2176 int rv = stream->OnAdditionalResponseHeadersReceived(headers);
2198 // NOTE: it may just be that the stream was cancelled.
2199 LOG(WARNING) << "Received RST for invalid stream" << stream_id;
2203 CHECK_EQ(it->second.stream->stream_id(), stream_id);
2206 it->second.stream->OnDataReceived(scoped_ptr<SpdyBuffer>());
2212 it->second.stream->LogStreamError(
2214 base::StringPrintf("SPDY stream closed with status: %d", status));
2317 // WINDOW_UPDATE for a stream.
2320 LOG(WARNING) << "Received WINDOW_UPDATE for stream " << stream_id
2328 // NOTE: it may just be that the stream was cancelled.
2329 LOG(WARNING) << "Received WINDOW_UPDATE for invalid stream " << stream_id;
2333 SpdyStream* stream = it->second.stream;
2334 CHECK_EQ(stream->stream_id(), stream_id);
2345 CHECK_EQ(it->second.stream->stream_id(), stream_id);
2346 it->second.stream->IncreaseSendWindowSize(
2361 CHECK_EQ(it->second.stream->stream_id(), stream_id);
2363 stream_id, delta_window_size, it->second.stream->priority());
2486 it->second.stream->AdjustSendWindowSize(delta_window_size);
2515 CHECK_EQ(it->second.stream->stream_id(), stream_id);
2690 base::WeakPtr<SpdyStream> stream;
2691 int rv = CreateStream(*pending_request, &stream);
2695 DCHECK(stream.get());
2696 pending_request->OnRequestCompleteSuccess(&stream);
2698 DCHECK(!stream.get());
2717 // deleted (e.g., a stream is closed due to incoming data).
2739 // deleted (e.g., a stream is closed due to incoming data).
2857 void SpdySession::QueueSendStalledStream(const SpdyStream& stream) {
2858 DCHECK(stream
2859 stream_send_unstall_queue_[stream.priority()].push_back(stream.stream_id());
2893 // The stream may actually still be send-stalled after this (due
2897 it->second.stream->PossiblyResumeIfSendStalled();