xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
ISocket.h
Go to the documentation of this file.
1#ifndef NET_I_SOCKET_H
2#define NET_I_SOCKET_H
3
4#include <string>
5
6namespace Xale::Net
7{
8 class ISocket
9 {
10 public:
11 virtual bool connect(const std::string& hostAddress, int port) = 0;
12 virtual int send(const std::string* data, size_t size) = 0; // should be SecurePaquet in the future
13 virtual int receive(std::string* buffer, size_t size) = 0;
14 virtual void close() = 0;
15 };
16}
17
18#endif // NET_I_SOCKET_H
Definition ISocket.h:9
virtual void close()=0
virtual int receive(std::string *buffer, size_t size)=0
virtual int send(const std::string *data, size_t size)=0
virtual bool connect(const std::string &hostAddress, int port)=0
Definition IListenerSocket.h:7