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

Unified Diff: talk/media/sctp/sctpdataengine.h

Issue 1304063006: (try 2) Added send-thresholding and fixed text packet dumping (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Simplification of GetChannelFromSocket, and a dcheck moved. Created 5 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 | talk/media/sctp/sctpdataengine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/sctp/sctpdataengine.h
diff --git a/talk/media/sctp/sctpdataengine.h b/talk/media/sctp/sctpdataengine.h
index 86bfa37a48c10dca4c3f5b0cad9a330d27aea10e..20d9ed7792dab001cd7b64cb47f0fe40d45ba44a 100644
--- a/talk/media/sctp/sctpdataengine.h
+++ b/talk/media/sctp/sctpdataengine.h
@@ -64,6 +64,8 @@ const uint32 kMaxSctpSid = 1023;
// usrsctp.h)
const int kSctpDefaultPort = 5000;
+class SctpDataMediaChannel;
+
// A DataEngine that interacts with usrsctp.
//
// From channel calls, data flows like this:
@@ -88,7 +90,7 @@ const int kSctpDefaultPort = 5000;
// 14. SctpDataMediaChannel::SignalDataReceived(data)
// [from the same thread, methods registered/connected to
// SctpDataMediaChannel are called with the recieved data]
-class SctpDataEngine : public DataEngineInterface {
+class SctpDataEngine : public DataEngineInterface, public sigslot::has_slots<> {
public:
SctpDataEngine();
virtual ~SctpDataEngine();
@@ -97,9 +99,13 @@ class SctpDataEngine : public DataEngineInterface {
virtual const std::vector<DataCodec>& data_codecs() { return codecs_; }
+ static int SendThresholdCallback(struct socket* sock, uint32_t sb_free);
+
private:
static int usrsctp_engines_count;
std::vector<DataCodec> codecs_;
+
+ static SctpDataMediaChannel* GetChannelFromSocket(struct socket* sock);
};
// TODO(ldixon): Make into a special type of TypedMessageData.
@@ -183,12 +189,13 @@ class SctpDataMediaChannel : public DataMediaChannel,
const rtc::PacketTime& packet_time) {}
virtual void OnReadyToSend(bool ready) {}
+ void OnSendThresholdCallback();
// Helper for debugging.
void set_debug_name(const std::string& debug_name) {
debug_name_ = debug_name;
}
const std::string& debug_name() const { return debug_name_; }
-
+ const struct socket* socket() const { return sock_; }
private:
sockaddr_conn GetSctpSockAddr(int port);
« no previous file with comments | « no previous file | talk/media/sctp/sctpdataengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698