iceudpmuxlistener.cpp 873 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Copyright (c) 2025 Alex Potsides
  3. * Copyright (c) 2025 Paul-Louis Ageneau
  4. *
  5. * This Source Code Form is subject to the terms of the Mozilla Public
  6. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  8. */
  9. #include "iceudpmuxlistener.hpp"
  10. #include "impl/iceudpmuxlistener.hpp"
  11. namespace rtc {
  12. IceUdpMuxListener::IceUdpMuxListener(uint16_t port, optional<string> bindAddress)
  13. : CheshireCat<impl::IceUdpMuxListener>(port, std::move(bindAddress)) {}
  14. IceUdpMuxListener::~IceUdpMuxListener() {}
  15. void IceUdpMuxListener::stop() { impl()->stop(); }
  16. uint16_t IceUdpMuxListener::port() const { return impl()->port; }
  17. void IceUdpMuxListener::OnUnhandledStunRequest(std::function<void(IceUdpMuxRequest)> callback) {
  18. impl()->unhandledStunRequestCallback = callback;
  19. }
  20. } // namespace rtc