diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 02:19:10 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 02:19:10 +0000 |
commit | d7bd1f86f904275aed0aa483662e1ad72016d9a8 (patch) | |
tree | e9cdf88998324bb9eb87ccd088506c62f383960d /webkit/glue | |
parent | f9939d9350f983a8f392036dc052bdbce7659b03 (diff) | |
download | chromium_src-d7bd1f86f904275aed0aa483662e1ad72016d9a8.zip chromium_src-d7bd1f86f904275aed0aa483662e1ad72016d9a8.tar.gz chromium_src-d7bd1f86f904275aed0aa483662e1ad72016d9a8.tar.bz2 |
Revert 80567 - P2P Transport implementation.TEST=Unittests.BUG=NoneReview URL: http://codereview.chromium.org/6791023
TBR=sergeyu@chromium.org
Review URL: http://codereview.chromium.org/6799003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/p2p_transport.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/webkit/glue/p2p_transport.h b/webkit/glue/p2p_transport.h index e80ffb5..5cd30c5 100644 --- a/webkit/glue/p2p_transport.h +++ b/webkit/glue/p2p_transport.h @@ -7,10 +7,6 @@ #include <string> -namespace net { -class Socket; -} // namespace net - namespace webkit_glue { // Interface for P2P transport. @@ -31,24 +27,23 @@ class P2PTransport { // Called when readable of writable state of the stream changes. virtual void OnStateChange(State state) = 0; + + // Called when a message received from the peer. P2PTransport keeps + // owneship of |data|. + virtual void OnMessageReceived(const char* data, size_t data_size) = 0; }; virtual ~P2PTransport() {} - // Initialize transport using specified configuration. Returns true - // if initialization succeeded. - virtual bool Init(const std::string& name, - const std::string& config, + // Initialize transport using specified configuration. + virtual void Init(const std::string& config, EventHandler* event_handler) = 0; - // Add candidate received from the remote peer. Returns false if the - // provided address is not in a valid format. - virtual bool AddRemoteCandidate(const std::string& address) = 0; + // Add candidate received from the remote peer. + virtual void AddRemoteCandidate(const std::string& address) = 0; - // Returns socket interface that can be used to send/receive - // data. Returned object is owned by the transport. Pending calls on - // the socket are canceled when the transport is destroyed. - virtual net::Socket* GetChannel() = 0; + // Send data to the other end. Caller keeps ownership of |data|. + virtual void Send(const char* data, int data_size) = 0; }; } // namespace webkit_glue |