Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: net/quic/quic_chromium_client_stream.h

Issue 1856073002: Coalesce small buffers in net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix javadoc Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // NOTE: This code is not shared between Google and Chrome. 5 // NOTE: This code is not shared between Google and Chrome.
6 6
7 #ifndef NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 7 #ifndef NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
8 #define NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 8 #define NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
11 #include <vector>
11 12
12 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "net/base/ip_endpoint.h" 15 #include "net/base/ip_endpoint.h"
15 #include "net/base/upload_data_stream.h" 16 #include "net/base/upload_data_stream.h"
16 #include "net/http/http_request_info.h" 17 #include "net/http/http_request_info.h"
17 #include "net/http/http_response_info.h" 18 #include "net/http/http_response_info.h"
18 #include "net/http/http_stream.h" 19 #include "net/http/http_stream.h"
19 #include "net/quic/quic_spdy_stream.h" 20 #include "net/quic/quic_spdy_stream.h"
20 21
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 QuicAckListenerInterface* ack_notifier_delegate) override; 73 QuicAckListenerInterface* ack_notifier_delegate) override;
73 SpdyPriority priority() const override; 74 SpdyPriority priority() const override;
74 75
75 // While the server's set_priority shouldn't be called externally, the creator 76 // While the server's set_priority shouldn't be called externally, the creator
76 // of client-side streams should be able to set the priority. 77 // of client-side streams should be able to set the priority.
77 using QuicSpdyStream::SetPriority; 78 using QuicSpdyStream::SetPriority;
78 79
79 int WriteStreamData(base::StringPiece data, 80 int WriteStreamData(base::StringPiece data,
80 bool fin, 81 bool fin,
81 const CompletionCallback& callback); 82 const CompletionCallback& callback);
83 // Same as WriteStreamData except it writes data from a vector of IOBuffers,
84 // with the length of each buffer at the corresponding index in |lengths|.
85 int WritevStreamData(const std::vector<IOBuffer*>& buffers,
86 const std::vector<int>& lengths,
87 bool fin,
88 const CompletionCallback& callback);
82 // Set new |delegate|. |delegate| must not be NULL. 89 // Set new |delegate|. |delegate| must not be NULL.
83 // If this stream has already received data, OnDataReceived() will be 90 // If this stream has already received data, OnDataReceived() will be
84 // called on the delegate. 91 // called on the delegate.
85 void SetDelegate(Delegate* delegate); 92 void SetDelegate(Delegate* delegate);
86 Delegate* GetDelegate() { return delegate_; } 93 Delegate* GetDelegate() { return delegate_; }
87 void OnError(int error); 94 void OnError(int error);
88 95
89 // Reads at most |buf_len| bytes into |buf|. Returns the number of bytes read. 96 // Reads at most |buf_len| bytes into |buf|. Returns the number of bytes read.
90 int Read(IOBuffer* buf, int buf_len); 97 int Read(IOBuffer* buf, int buf_len);
91 98
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 std::deque<base::Closure> delegate_tasks_; 137 std::deque<base::Closure> delegate_tasks_;
131 138
132 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; 139 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_;
133 140
134 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); 141 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream);
135 }; 142 };
136 143
137 } // namespace net 144 } // namespace net
138 145
139 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 146 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/quic_chromium_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698