diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-02 17:28:10 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-02 17:28:10 +0000 |
commit | 26d912d33fc645ff2499e3537adad66d46e76b33 (patch) | |
tree | 809d8c79564ba2d697b608347cabcf24a8e8857b /webkit/glue | |
parent | c0022e306a82f29b471bc5d0e7700030de3f9cc5 (diff) | |
download | chromium_src-26d912d33fc645ff2499e3537adad66d46e76b33.zip chromium_src-26d912d33fc645ff2499e3537adad66d46e76b33.tar.gz chromium_src-26d912d33fc645ff2499e3537adad66d46e76b33.tar.bz2 |
Implement PseudoTCP support in P2P Transport Pepper API.
BUG=None
TEST=Unittests
Review URL: http://codereview.chromium.org/6893101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/p2p_transport.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/webkit/glue/p2p_transport.h b/webkit/glue/p2p_transport.h index e80ffb5..2c3200f 100644 --- a/webkit/glue/p2p_transport.h +++ b/webkit/glue/p2p_transport.h @@ -22,6 +22,11 @@ class P2PTransport { STATE_READABLE = 2, }; + enum Protocol { + PROTOCOL_UDP = 0, + PROTOCOL_TCP = 1, + }; + class EventHandler { public: virtual ~EventHandler() {} @@ -31,6 +36,11 @@ class P2PTransport { // Called when readable of writable state of the stream changes. virtual void OnStateChange(State state) = 0; + + // Called when an error occures (e.g. TCP handshake + // failed). P2PTransport object is not usable after that and + // should be destroyed. + virtual void OnError(int error) = 0; }; virtual ~P2PTransport() {} @@ -38,6 +48,7 @@ class P2PTransport { // Initialize transport using specified configuration. Returns true // if initialization succeeded. virtual bool Init(const std::string& name, + Protocol protocol, const std::string& config, EventHandler* event_handler) = 0; |