xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
LinuxClientConnection.h
Go to the documentation of this file.
1#ifndef NET_LINUX_CLIENT_CONNECTION_H
2#define NET_LINUX_CLIENT_CONNECTION_H
3
4#if defined(__linux__) || defined(linux) || defined(__GNUG__)
5
6#include <Logger.h>
7
9
10#include <sys/socket.h>
11#include <unistd.h>
12#include <vector>
13#include <cstdint>
14
15namespace Xale::Net
16{
20 class LinuxClientConnection : public IClientConnection
21 {
22 public:
27 explicit LinuxClientConnection(int fd);
28
32 ~LinuxClientConnection() override;
33
37 int read(std::vector<uint8_t>& buffer, size_t size) override;
38
42 int respond(const std::vector<uint8_t>* data, size_t size) override;
43
47 void close() override;
48
49 private:
50 int _fd;
51 Xale::Logger::Logger<LinuxClientConnection>& _logger;
52 };
53}
54
55#endif // linux
56#endif // NET_LINUX_CLIENT_CONNECTION_H
Represents an established per-client TCP connection.
Definition IClientConnection.h:16
Definition IPacket.h:8