21 #ifndef GV_COMMAND_SOCKET__H
22 #define GV_COMMAND_SOCKET__H
35 class CommandSocketMixin ;
36 class CommandSocketMixinImp ;
68 void connect(
const std::string & connect_name ) ;
73 std::string
connect(
const std::string & connect_name ,
NoThrow ) ;
84 static Type parse(
const std::string & bind_name ) ;
96 unique_ptr<G::LocalSocket> m_local ;
97 unique_ptr<GNet::DatagramSocket> m_net ;
98 std::vector<char> m_buffer ;
Describes a Gv::CommandSocket as a UDP address or unix-domain path.
virtual void onCommandSocketData(std::string)=0
Callback that delivers a datagram.
An empty structure that is used to indicate a signal-safe, reentrant implementation.
Overload descriminator for Gv::CommandSocket.
A mixin base class that contains a bound Gv::CommandSocket object integrated with the GNet::EventLoop...
CommandSocket()
Constructor for a sending socket.
static Type parse(const std::string &bind_name)
Parses a filesystem path or transport address.
void connect(const std::string &connect_name)
Creates an association with the remote socket, taking a local filesystem path or a transport address...
int fd() const
Returns the file descriptor.
virtual ~CommandSocketMixin()
Destructor.
std::string read()
Reads the socket. Returns the empty string on error.
A non-blocking datagram socket that is used for sending and receiving process control commands...
void close()
Closes the sending socket, if open.
CommandSocketMixin(const std::string &bind_name)
Constructor.
A pimple-pattern implementation class for Gv::CommandSocketMixin.