23 lines
469 B
C++
23 lines
469 B
C++
#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;
|
|
}; |