Restructure Storage Module -> Connection module

This commit is contained in:
IlushaShurupov 2023-07-21 19:55:31 +03:00
parent fa4d1d72dc
commit e9dbee6667
24 changed files with 121 additions and 354 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();
static int1* read(Socket client);
static void write(Socket client, const int1* message);
};
class Client {
ClientContext* mContext;
public:
Client();
~Client();
void connect(const int1* IP, ualni PORT);
int1* read();
void write(const int1* message);
};
}