24#include <sys/socket.h> 
   30#define BUFFER_SIZE (32 * 1024) 
   33                      public std::enable_shared_from_this<DobbyLogRelay>
 
   37                  const std::string &destinationSocketPath);
 
   41    void process(
const std::shared_ptr<AICommon::IPollLoop> &pollLoop, epoll_event event) 
override;
 
   42    void addToPollLoop(
const std::shared_ptr<AICommon::IPollLoop> &pollLoop);
 
   49    const std::string mSourceSocketPath;
 
   50    const std::string mDestinationSocketPath;
 
   53    int mDestinationSocketFd;
 
   55    sockaddr_un mDestinationSocketAddress;
 
   57    char mBuf[BUFFER_SIZE];
 
 
Definition IPollLoop.h:40
 
Definition DobbyLogRelay.h:34
 
void addToPollLoop(const std::shared_ptr< AICommon::IPollLoop > &pollLoop)
Adds the log relay to a given poll loop so that the process() method is called when the source socket...
Definition DobbyLogRelay.cpp:105
 
void removeFromPollLoop(const std::shared_ptr< AICommon::IPollLoop > &pollLoop)
Removes the log relay to a given poll loop.
Definition DobbyLogRelay.cpp:116
 
void process(const std::shared_ptr< AICommon::IPollLoop > &pollLoop, epoll_event event) override
Called on the poll loop. Forwards the data from the source to the destination socket.
Definition DobbyLogRelay.cpp:128
 
int createDgramSocket(const std::string &path)
Create a SOCK_DGRAM AF_UNIX socket at the given path. Removes the socket at the given path if it exis...
Definition DobbyLogRelay.cpp:183