...
This commit is contained in:
parent
64ded5f3f3
commit
cbc69bb9ce
@ -259,4 +259,27 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
template <typename SocketT>
|
||||
class AdcAbstractNetServer
|
||||
{
|
||||
public:
|
||||
struct ServerControls {
|
||||
std::function<void(SocketT*)> onOpen;
|
||||
std::function<void(SocketT*, std::error_code)> onClose;
|
||||
std::function<void(SocketT*, std::span<const char>)> onData;
|
||||
};
|
||||
|
||||
|
||||
AdcAbstractNetServer(ServerControls&& ctls) : _serverControls(std::move(ctls)) {}
|
||||
|
||||
template <typename EnptT>
|
||||
void listen(const EnptT& endpoint)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
ServerControls _serverControls;
|
||||
};
|
||||
|
||||
|
||||
} // namespace adc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user