Reorganize socket classes

This commit is contained in:
2019-06-16 11:42:26 +02:00
parent 9ba225cbde
commit e9509fb117
8 changed files with 32 additions and 33 deletions

View File

@@ -0,0 +1,23 @@
#pragma once
#include <cstdint>
#include <vector>
class ClientSocket
{
private:
int fileDescriptor;
public:
// Parameter limit is a multiple of 128
std::vector<char> ReadBytes(size_t limit = 512) const;
size_t WriteBytes(std::vector<char> const & bytes) const;
ClientSocket(int _fileDescriptor);
~ClientSocket();
ClientSocket(ClientSocket && other);
ClientSocket(ClientSocket & other) = delete;
ClientSocket & operator=(ClientSocket & other) = delete;
};