WPILibC++  unspecified
NetworkListener.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2015-2017 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #ifndef CSCORE_NETWORKLISTENER_H_
9 #define CSCORE_NETWORKLISTENER_H_
10 
11 #include <support/SafeThread.h>
12 #include <support/atomic_static.h>
13 
14 namespace cs {
15 
17  public:
18  static NetworkListener& GetInstance() {
19  ATOMIC_STATIC(NetworkListener, instance);
20  return instance;
21  }
22  ~NetworkListener();
23 
24  void Start();
25  void Stop();
26 
27  private:
28  NetworkListener() = default;
29 
30  class Thread;
32 
33  ATOMIC_STATIC_DECL(NetworkListener)
34 };
35 
36 } // namespace cs
37 
38 #endif // CSCORE_NETWORKLISTENER_H_
Definition: SinkImpl.h:19
Definition: NetworkListener.cpp:30
Definition: NetworkListener.h:16