|
VideoTools
|
A non-blocking datagram socket that is used for sending and receiving process control commands. More...
#include <gvcommandsocket.h>
Classes | |
| struct | NoThrow |
| Overload descriminator for Gv::CommandSocket. More... | |
| struct | Type |
| Describes a Gv::CommandSocket as a UDP address or unix-domain path. More... | |
Public Member Functions | |
| CommandSocket (const std::string &bind_name) | |
| Constructor for a receiving socket, taking a local filesystem path or a transport address. More... | |
| CommandSocket () | |
| Constructor for a sending socket. | |
| void | connect (const std::string &connect_name) |
| Creates an association with the remote socket, taking a local filesystem path or a transport address. More... | |
| std::string | connect (const std::string &connect_name, NoThrow) |
| Creates an association with the remote socket, taking a local filesystem path or a transport address. More... | |
| int | fd () const |
| Returns the file descriptor. | |
| std::string | read () |
| Reads the socket. Returns the empty string on error. | |
| void | close () |
| Closes the sending socket, if open. | |
Static Public Member Functions | |
| static Type | parse (const std::string &bind_name) |
| Parses a filesystem path or transport address. | |
A non-blocking datagram socket that is used for sending and receiving process control commands.
The socket is either a local unix-domain socket, or a UDP network socket, depending on the format of the socket name, although a prefix of "udp://" can be used to override the heuristics. Synchronous DNS lookups are used if necessary.
Definition at line 46 of file gvcommandsocket.h.
|
explicit |
Constructor for a receiving socket, taking a local filesystem path or a transport address.
Does synchronous dns resolution if necessary. Constructs a do-nothing object if the name is empty. On error fd() returns -1.
Definition at line 46 of file gvcommandsocket.cpp.
| void Gv::CommandSocket::connect | ( | const std::string & | connect_name | ) |
Creates an association with the remote socket, taking a local filesystem path or a transport address.
Does synchronous dns resolution if necessary. Throws on error.
Definition at line 90 of file gvcommandsocket.cpp.
| std::string Gv::CommandSocket::connect | ( | const std::string & | connect_name, |
| NoThrow | |||
| ) |
Creates an association with the remote socket, taking a local filesystem path or a transport address.
Does synchronous dns resolution if necessary. Returns a failure reason on error.
Definition at line 115 of file gvcommandsocket.cpp.