diff options
author | guoweis@webrtc.org <guoweis@webrtc.org> | 2014-11-17 19:42:14 +0000 |
---|---|---|
committer | guoweis@webrtc.org <guoweis@webrtc.org> | 2014-11-17 19:42:14 +0000 |
commit | 930e004a817ed346a99ac8e56575326ca75e72aa (patch) | |
tree | 349b830fa2cb1a65fd1da92cd096051f4ed3f559 /webrtc/p2p/base/tcpport.cc | |
parent | c72a22c23d1174a58976e61bce809fd7d2e71399 (diff) | |
download | webrtc-930e004a817ed346a99ac8e56575326ca75e72aa.tar.gz |
Add jmi field for packets discarded due to network error
Also included the total packets attempted to send.
BUG=427555
Copied from https://webrtc-codereview.appspot.com/25959004/
R=harryjin@google.com, juberti@webrtc.org
Committed: https://code.google.com/p/webrtc/source/detail?r=7693
Review URL: https://webrtc-codereview.appspot.com/32039004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7713 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'webrtc/p2p/base/tcpport.cc')
-rw-r--r-- | webrtc/p2p/base/tcpport.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/webrtc/p2p/base/tcpport.cc b/webrtc/p2p/base/tcpport.cc index c5891f2869..89265d7b11 100644 --- a/webrtc/p2p/base/tcpport.cc +++ b/webrtc/p2p/base/tcpport.cc @@ -272,8 +272,10 @@ int TCPConnection::Send(const void* data, size_t size, error_ = EWOULDBLOCK; return SOCKET_ERROR; } + sent_packets_total_++; int sent = socket_->Send(data, size, options); if (sent < 0) { + sent_packets_discarded_++; error_ = socket_->GetError(); } else { send_rate_tracker_.Update(sent); |