mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 19:16:30 +03:00
35 lines
660 B
C++
35 lines
660 B
C++
#include "bus.hpp"
|
|
#include "config.hpp"
|
|
#include <eepp/network/tcpsocket.hpp>
|
|
|
|
using namespace EE::Network;
|
|
|
|
namespace ecode {
|
|
|
|
class BusSocket : public Bus {
|
|
public:
|
|
BusSocket( const Connection& connection );
|
|
|
|
virtual ~BusSocket();
|
|
|
|
bool start() override;
|
|
|
|
bool close() override;
|
|
|
|
void startAsyncRead( ReadFn readFn ) override;
|
|
|
|
size_t write( const char* buffer, const size_t& size ) override;
|
|
|
|
bool hasProcess() override { return false; }
|
|
|
|
Type type() const override { return Bus::Type::Socket; }
|
|
|
|
const Connection& getConnection() const { return mConnection; }
|
|
|
|
protected:
|
|
Connection mConnection;
|
|
TcpSocket mSocket;
|
|
};
|
|
|
|
} // namespace ecode
|