Files
allwpilib/wpiutil/src/main/native/include/wpi/NetworkAcceptor.h

33 lines
1.0 KiB
C
Raw Normal View History

/*----------------------------------------------------------------------------*/
2018-01-01 17:32:39 -08:00
/* Copyright (c) 2015-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
2018-05-13 17:09:56 -07:00
#ifndef WPIUTIL_WPI_NETWORKACCEPTOR_H_
#define WPIUTIL_WPI_NETWORKACCEPTOR_H_
2017-10-21 20:31:20 -07:00
#include <memory>
#include "wpi/NetworkStream.h"
namespace wpi {
class NetworkAcceptor {
public:
NetworkAcceptor() = default;
virtual ~NetworkAcceptor() = default;
virtual int start() = 0;
virtual void shutdown() = 0;
virtual std::unique_ptr<NetworkStream> accept() = 0;
NetworkAcceptor(const NetworkAcceptor&) = delete;
NetworkAcceptor& operator=(const NetworkAcceptor&) = delete;
};
} // namespace wpi
2018-05-13 17:09:56 -07:00
#endif // WPIUTIL_WPI_NETWORKACCEPTOR_H_