turn_port_factory.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright 2017 The WebRTC Project Authors. All rights reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef P2P_CLIENT_TURN_PORT_FACTORY_H_
  11. #define P2P_CLIENT_TURN_PORT_FACTORY_H_
  12. #include <memory>
  13. #include "p2p/base/port.h"
  14. #include "p2p/client/relay_port_factory_interface.h"
  15. #include "rtc_base/async_packet_socket.h"
  16. namespace cricket {
  17. // This is a RelayPortFactory that produces TurnPorts.
  18. class TurnPortFactory : public RelayPortFactoryInterface {
  19. public:
  20. ~TurnPortFactory() override;
  21. std::unique_ptr<Port> Create(const CreateRelayPortArgs& args,
  22. rtc::AsyncPacketSocket* udp_socket) override;
  23. std::unique_ptr<Port> Create(const CreateRelayPortArgs& args,
  24. int min_port,
  25. int max_port) override;
  26. };
  27. } // namespace cricket
  28. #endif // P2P_CLIENT_TURN_PORT_FACTORY_H_