summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/fake_session.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/protocol/fake_session.cc')
-rw-r--r--remoting/protocol/fake_session.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index f1a890a..18071fd 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -86,6 +86,13 @@ int FakeSocket::Write(net::IOBuffer* buf, int buf_len,
buf->data(), buf->data() + buf_len);
return buf_len;
}
+int FakeSocket::Write(net::IOBuffer* buf, int buf_len,
+ const net::CompletionCallback& callback) {
+ EXPECT_EQ(message_loop_, MessageLoop::current());
+ written_data_.insert(written_data_.end(),
+ buf->data(), buf->data() + buf_len);
+ return buf_len;
+}
bool FakeSocket::SetReceiveBufferSize(int32 size) {
NOTIMPLEMENTED();
@@ -236,6 +243,13 @@ int FakeUdpSocket::Write(net::IOBuffer* buf, int buf_len,
written_packets_.back().assign(buf->data(), buf->data() + buf_len);
return buf_len;
}
+int FakeUdpSocket::Write(net::IOBuffer* buf, int buf_len,
+ const net::CompletionCallback& callback) {
+ EXPECT_EQ(message_loop_, MessageLoop::current());
+ written_packets_.push_back(std::string());
+ written_packets_.back().assign(buf->data(), buf->data() + buf_len);
+ return buf_len;
+}
bool FakeUdpSocket::SetReceiveBufferSize(int32 size) {
NOTIMPLEMENTED();