Add P2PDatagramSocket and P2PStreamSocket interfaces.
commitaa22c0858c81fe75f72c1706cf052af85a82b364
authorsergeyu <sergeyu@chromium.org>
Mon, 20 Jul 2015 19:41:13 +0000 (20 12:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 20 Jul 2015 19:42:14 +0000 (20 19:42 +0000)
tree70f6d5f799424f2717e3ba8f2be5e49920760cbf
parent2f8fcec9046f09f299be21aca1145b82bf41cde3
Add P2PDatagramSocket and P2PStreamSocket interfaces.

Previously remoting code was using net::Socket and net::StreamSocket
for datagram and stream socket. Problem is that net::StreamSocket
interface contains a lot of methods that are not relevant for
peer-to-peer connections in remoting. Added P2PDatagramSocket and
P2PStreamSocket interfaces independent of net::Socket. This allowed to
remove a lot of the redundant code needed for net::StreamSocket
implementations. There are two new adapters required in
SslHmacChannelAuthenticator for the SSL layer, but these won't be
necessary after we migrate to QUIC.

Review URL: https://codereview.chromium.org/1197853003

Cr-Commit-Position: refs/heads/master@{#339489}
47 files changed:
remoting/base/buffered_socket_writer.cc
remoting/base/buffered_socket_writer.h
remoting/base/buffered_socket_writer_unittest.cc
remoting/client/key_event_mapper_unittest.cc
remoting/protocol/authenticator_test_base.cc
remoting/protocol/authenticator_test_base.h
remoting/protocol/channel_authenticator.h
remoting/protocol/channel_dispatcher_base.cc
remoting/protocol/channel_dispatcher_base.h
remoting/protocol/channel_multiplexer.cc
remoting/protocol/channel_multiplexer.h
remoting/protocol/channel_multiplexer_unittest.cc
remoting/protocol/channel_socket_adapter.cc
remoting/protocol/channel_socket_adapter.h
remoting/protocol/channel_socket_adapter_unittest.cc
remoting/protocol/client_video_dispatcher_unittest.cc
remoting/protocol/connection_tester.cc
remoting/protocol/connection_tester.h
remoting/protocol/datagram_channel_factory.h
remoting/protocol/fake_authenticator.cc
remoting/protocol/fake_authenticator.h
remoting/protocol/fake_datagram_socket.cc
remoting/protocol/fake_datagram_socket.h
remoting/protocol/fake_stream_socket.cc
remoting/protocol/fake_stream_socket.h
remoting/protocol/jingle_session.h
remoting/protocol/jingle_session_unittest.cc
remoting/protocol/libjingle_transport_factory.cc
remoting/protocol/message_reader.cc
remoting/protocol/message_reader.h
remoting/protocol/p2p_datagram_socket.h [new file with mode: 0644]
remoting/protocol/p2p_stream_socket.h [new file with mode: 0644]
remoting/protocol/pseudotcp_adapter.cc
remoting/protocol/pseudotcp_adapter.h
remoting/protocol/pseudotcp_adapter_unittest.cc
remoting/protocol/pseudotcp_channel_factory.cc
remoting/protocol/pseudotcp_channel_factory.h
remoting/protocol/secure_channel_factory.cc
remoting/protocol/secure_channel_factory.h
remoting/protocol/ssl_hmac_channel_authenticator.cc
remoting/protocol/ssl_hmac_channel_authenticator.h
remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
remoting/protocol/stream_channel_factory.h
remoting/protocol/transport.h
remoting/remoting_srcs.gypi
remoting/remoting_test.gypi
remoting/signaling/xmpp_signal_strategy.cc