blob: e59f2fafe589c960cd2e40798fd203974a67f1ae [file] [log] [blame]
henrike@webrtc.orgf0488722014-05-13 18:00:26 +00001/*
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
11#ifndef WEBRTC_BASE_NULLSOCKETSERVER_H_
12#define WEBRTC_BASE_NULLSOCKETSERVER_H_
13
14#include "webrtc/base/event.h"
danilchapbebf54c2016-04-28 01:32:48 -070015#include "webrtc/base/socketserver.h"
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000016
17namespace rtc {
18
danilchapbebf54c2016-04-28 01:32:48 -070019class NullSocketServer : public SocketServer {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000020 public:
danilchapbebf54c2016-04-28 01:32:48 -070021 NullSocketServer();
22 ~NullSocketServer() override;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000023
danilchapbebf54c2016-04-28 01:32:48 -070024 bool Wait(int cms, bool process_io) override;
25 void WakeUp() override;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000026
danilchapbebf54c2016-04-28 01:32:48 -070027 Socket* CreateSocket(int type) override;
28 Socket* CreateSocket(int family, int type) override;
29 AsyncSocket* CreateAsyncSocket(int type) override;
30 AsyncSocket* CreateAsyncSocket(int family, int type) override;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000031
32 private:
danilchapbebf54c2016-04-28 01:32:48 -070033 Event event_;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000034};
35
36} // namespace rtc
37
38#endif // WEBRTC_BASE_NULLSOCKETSERVER_H_