Files
nearby/cpp/core/internal/webrtc_endpoint_channel.cc
T
Alexey Polyudov 2155b3ddeb Roll forward to cl/338482889
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I9850950db8bd84f0904ea1a413151887f52098cf
2020-10-22 10:47:34 -07:00

24 lines
667 B
C++

#include "core/internal/webrtc_endpoint_channel.h"
namespace location {
namespace nearby {
namespace connections {
WebRtcEndpointChannel::WebRtcEndpointChannel(
const std::string& channel_name, mediums::WebRtcSocketWrapper socket)
: BaseEndpointChannel(channel_name, &socket.GetInputStream(),
&socket.GetOutputStream()),
webrtc_socket_(std::move(socket)) {}
proto::connections::Medium WebRtcEndpointChannel::GetMedium() const {
return proto::connections::Medium::WEB_RTC;
}
void WebRtcEndpointChannel::CloseImpl() {
webrtc_socket_.Close();
}
} // namespace connections
} // namespace nearby
} // namespace location