You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright 2012 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 RTC_BASE_NULL_SOCKET_SERVER_H_
  11. #define RTC_BASE_NULL_SOCKET_SERVER_H_
  12. #include "rtc_base/async_socket.h"
  13. #include "rtc_base/event.h"
  14. #include "rtc_base/socket.h"
  15. #include "rtc_base/socket_server.h"
  16. namespace rtc {
  17. class NullSocketServer : public SocketServer {
  18. public:
  19. NullSocketServer();
  20. ~NullSocketServer() override;
  21. bool Wait(int cms, bool process_io) override;
  22. void WakeUp() override;
  23. Socket* CreateSocket(int family, int type) override;
  24. AsyncSocket* CreateAsyncSocket(int family, int type) override;
  25. private:
  26. Event event_;
  27. };
  28. } // namespace rtc
  29. #endif // RTC_BASE_NULL_SOCKET_SERVER_H_