This commit is contained in:
Ilusha 2024-01-18 09:15:22 +03:00 committed by IlyaShurupov
parent f7f0d6e5be
commit 83d51d3e83
30 changed files with 1186 additions and 208 deletions

View file

@ -0,0 +1,36 @@
#pragma once
#include "Common.hpp"
namespace tp {
class ServerContext;
class ClientContext;
class Server {
ServerContext* mContext;
public:
typedef void* Socket;
public:
Server();
~Server();
void start(ualni port);
Socket accept();
bool read(Socket client, int1* message, halni size);
bool write(Socket client, const int1* message, halni size);
};
class Client {
ClientContext* mContext;
public:
Client();
~Client();
bool connect(const int1* IP, ualni PORT);
bool read(int1* buff, halni size);
bool write(const int1* message, halni size);
};
}