62 if (!readBackground) {
89 while (produce.check()) {
91 while (readBlock.check()) {
99 if (permanentReadDelegate !=
nullptr) {
100 bool result = permanentReadDelegate->
read(reader);
110 if (readDelegate !=
nullptr) {
111 readResult = readDelegate->
read(reader);
126 if (!readBackground) {
132 if (readDelegate !=
nullptr) {
133 readResult = readDelegate->read(reader);
140 if (!readBackground) {
141 readDelegate =
nullptr;
142 writeDelegate =
nullptr;
144 bool result = readResult;
146 if (!readBackground) {
149 if (result && willReply) {
156 if (writeDelegate !=
nullptr) {
159 if (writer !=
nullptr) {
160 result = readResult = writeDelegate->
write(*writer);
191 readDelegate = &reader;
193 writeDelegate =
nullptr;
194 this->willReply = willReply;
200 if (!readBackground) {
201 readDelegate =
nullptr;
203 bool result = readResult;
220 writeDelegate = &writer;
223 bool result = readResult;
236 readBackground =
true;
237 readDelegate = &reader;
238 permanentReadDelegate = &reader;
247 adminReadDelegate = &reader;
248 setAdminReadHandler(reader);
269 recCallbackLock = lock;
270 haveCallbackLock =
true;
271 return setCallbackLock(lock);
276 recCallbackLock =
nullptr;
277 haveCallbackLock =
false;
278 return removeCallbackLock();
288 return adminReadDelegate;
293 return recReadCreator;
298 return recWaitAfterSend;
309 this->opened = opened;
A simple collection of objects that can be described and transmitted in a portable way.
bool read(ConnectionReader &reader) override
Set the bottle's value based on input from a network connection.
A mini-server for performing network communication in the background.
T * read(bool shouldWait=true) override
Read an available object from the port.
void write(bool forceStrict=false)
Write the current object being returned by BufferedPort::prepare.
An interface for reading from a network connection.
virtual void requestDrop()=0
Tag the connection to be dropped after the current message.
virtual ConnectionWriter * getWriter()=0
Gets a way to reply to the message, if possible.
virtual bool isValid() const =0
An interface for writing to a network connection.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
A mini-server for network communication.
static double nowSystem()
static void delaySystem(double seconds)
PortReaderCreator * checkReadCreator()
void includeNodeInName(bool flag)
void configWaitAfterSend(bool waitAfterSend)
void configReadCreator(PortReaderCreator &creator)
void configAdminReader(PortReader &reader)
bool configCallbackLock(std::mutex *lock)
bool reply(PortWriter &writer, bool drop, bool interrupted)
PortReader * checkAdminPortReader()
PortReader * checkPortReader()
PortCoreAdapter(Port &owner)
bool unconfigCallbackLock()
void configReader(PortReader &reader)
void setOpen(bool opened)
bool read(ConnectionReader &reader) override
Callback for data.
void setContactable(Contactable *contactable)
#define yCError(component,...)
#define yCDebug(component,...)
#define YARP_OS_LOG_COMPONENT(name, name_string)