39 if (
str.length() > 0) {
51 if (
str.length() > 0) {
65 len = (
int)
str.length() + 1;
A mini-server for performing network communication in the background.
A simple abstraction for a block of bytes.
An interface for reading from a network connection.
virtual bool isTextMode() const =0
Check if the connection is text mode.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
virtual std::string expectText(const char terminatingChar='\n')=0
Read some text from the network connection.
virtual bool isError() const =0
An interface for writing to a network connection.
virtual bool isError() const =0
virtual bool isTextMode() const =0
Check if the connection is text mode.
virtual void appendText(const std::string &str, const char terminate='\n')=0
Send a terminated string to the network connection.
virtual void appendBlock(const char *data, size_t len)=0
Send a block of data to the network connection.
const Bytes & bytes() const
static int netInt(const yarp::os::Bytes &code)
bool write(yarp::os::ConnectionWriter &writer) const override
Write this object to a network connection.
yarp::os::ManagedBytes header
bool read(yarp::os::ConnectionReader &reader) override
Read this object from a network connection.
#define yCAssert(component, x)
#define yCTrace(component,...)
#define yCDebug(component,...)
#define YARP_OS_LOG_COMPONENT(name, name_string)
The components from which ports and connections are built.
An interface to the operating system, including Port based communication.