Restructure Storage Module -> Connection module
This commit is contained in:
parent
fa4d1d72dc
commit
e9dbee6667
24 changed files with 121 additions and 354 deletions
|
|
@ -1,51 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "Common.hpp"
|
||||
|
||||
namespace tp {
|
||||
class FileSystemHandle {
|
||||
void* stream;
|
||||
public:
|
||||
FileSystemHandle();
|
||||
~FileSystemHandle();
|
||||
void open(const char*, bool);
|
||||
bool isOpen();
|
||||
void close();
|
||||
void seekp(ualni);
|
||||
void read(int1*, ualni);
|
||||
void write(const int1*, ualni);
|
||||
ualni size();
|
||||
};
|
||||
|
||||
|
||||
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);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue