-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathServerContext.h
More file actions
29 lines (21 loc) · 838 Bytes
/
Copy pathServerContext.h
File metadata and controls
29 lines (21 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef SERVERCONTEXT_H
#define SERVERCONTEXT_H
#include <core/socket/stream/SocketContext.h> // IWYU pragma: export
#include <core/socket/stream/SocketContextFactory.h>
// IWYU pragma: no_include <SocketContext.h>
namespace core::socket {
class SocketConnection;
}
class ServerContext : public core::socket::stream::SocketContext {
public:
explicit ServerContext(core::socket::stream::SocketConnection* socketConnection);
private:
void onConnected() override;
void onDisconnected() override;
[[nodiscard]] bool onSignal(int signum) override;
std::size_t onReceivedFromPeer() override;
};
class ServerContextFactory : public core::socket::stream::SocketContextFactory {
core::socket::stream::SocketContext* create(core::socket::stream::SocketConnection* socketConnection);
};
#endif // SERVERCONTEXT_H