WPILibC++  2018.4.1-20180824234721-1176-gd6d5321
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
NetworkAcceptor.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2015-2018 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 WPIUTIL_WPI_NETWORKACCEPTOR_H_
9 #define WPIUTIL_WPI_NETWORKACCEPTOR_H_
10 
11 #include <memory>
12 
13 #include "wpi/NetworkStream.h"
14 
15 namespace wpi {
16 
18  public:
19  NetworkAcceptor() = default;
20  virtual ~NetworkAcceptor() = default;
21 
22  virtual int start() = 0;
23  virtual void shutdown() = 0;
24  virtual std::unique_ptr<NetworkStream> accept() = 0;
25 
26  NetworkAcceptor(const NetworkAcceptor&) = delete;
27  NetworkAcceptor& operator=(const NetworkAcceptor&) = delete;
28 };
29 
30 } // namespace wpi
31 
32 #endif // WPIUTIL_WPI_NETWORKACCEPTOR_H_
WPILib C++ utilities (wpiutil) namespace.
Definition: SmallString.h:21
Definition: NetworkAcceptor.h:17