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

Unified Diff: webrtc/p2p/base/fakepackettransport.h

Issue 2997983002: Completed the functionalities of SrtpTransport. (Closed)
Patch Set: Fix the chromimum issue. Created 3 years, 4 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 | « no previous file | webrtc/pc/channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/fakepackettransport.h
diff --git a/webrtc/p2p/base/fakepackettransport.h b/webrtc/p2p/base/fakepackettransport.h
index 16af9a42aec5a5241e38b223cbd8dba7982e277a..82d39c23646712bc4a6ccf88ff8a19221923fe5f 100644
--- a/webrtc/p2p/base/fakepackettransport.h
+++ b/webrtc/p2p/base/fakepackettransport.h
@@ -86,6 +86,8 @@ class FakePacketTransport : public PacketTransportInternal {
bool GetOption(Socket::Option opt, int* value) override { return true; }
int GetError() override { return 0; }
+ const CopyOnWriteBuffer* last_sent_packet() { return &last_sent_packet_; }
+
private:
void set_writable(bool writable) {
if (writable_ == writable) {
@@ -107,12 +109,14 @@ class FakePacketTransport : public PacketTransportInternal {
}
void SendPacketInternal(const CopyOnWriteBuffer& packet) {
+ last_sent_packet_ = packet;
if (dest_) {
dest_->SignalReadPacket(dest_, packet.data<char>(), packet.size(),
CreatePacketTime(0), 0);
}
}
+ CopyOnWriteBuffer last_sent_packet_;
AsyncInvoker invoker_;
std::string debug_name_;
FakePacketTransport* dest_ = nullptr;
« no previous file with comments | « no previous file | webrtc/pc/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698