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); |