WPILibC++  unspecified
NetworkAcceptor.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2015. 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_TCPSOCKETS_NETWORKACCEPTOR_H_
9 #define WPIUTIL_TCPSOCKETS_NETWORKACCEPTOR_H_
10 
11 #include "tcpsockets/NetworkStream.h"
12 
13 namespace wpi {
14 
16  public:
17  NetworkAcceptor() = default;
18  virtual ~NetworkAcceptor() = default;
19 
20  virtual int start() = 0;
21  virtual void shutdown() = 0;
22  virtual std::unique_ptr<NetworkStream> accept() = 0;
23 
24  NetworkAcceptor(const NetworkAcceptor&) = delete;
25  NetworkAcceptor& operator=(const NetworkAcceptor&) = delete;
26 };
27 
28 } // namespace wpi
29 
30 #endif // WPIUTIL_TCPSOCKETS_NETWORKACCEPTOR_H_
Definition: SocketError.cpp:18
Definition: NetworkAcceptor.h:15