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

Unified Diff: remoting/protocol/fake_stream_socket.h

Issue 2757723002: Update ICE protocol to handle closed channel (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/fake_session.cc ('k') | remoting/protocol/fake_stream_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_stream_socket.h
diff --git a/remoting/protocol/fake_stream_socket.h b/remoting/protocol/fake_stream_socket.h
index 83237dcafb6ca0d1443a427ae0991f985131bac9..0e53fd77c2397f2f387f1de4818a431e72970c92 100644
--- a/remoting/protocol/fake_stream_socket.h
+++ b/remoting/protocol/fake_stream_socket.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/optional.h"
#include "net/base/completion_callback.h"
#include "remoting/protocol/p2p_stream_socket.h"
#include "remoting/protocol/stream_channel_factory.h"
@@ -55,7 +56,7 @@ class FakeStreamSocket : public P2PStreamSocket {
// Causes Read() to fail with |error| once the read buffer is exhausted. If
// there is a currently pending Read, it is interrupted.
- void AppendReadError(int error);
+ void SetReadError(int error);
// Pairs the socket with |peer_socket|. Deleting either of the paired sockets
// unpairs them.
@@ -85,7 +86,7 @@ class FakeStreamSocket : public P2PStreamSocket {
int write_limit_ = 0;
int next_write_error_ = 0;
- int next_read_error_ = 0;
+ base::Optional<int> next_read_error_;
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_ = 0;
net::CompletionCallback read_callback_;
« no previous file with comments | « remoting/protocol/fake_session.cc ('k') | remoting/protocol/fake_stream_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698