7#ifndef YARP_OS_IMPL_DGRAMTWOWAYSTREAM_H
8#define YARP_OS_IMPL_DGRAMTWOWAYSTREAM_H
17# include <ace/SOCK_Dgram.h>
18# include <ace/SOCK_Dgram_Mcast.h>
53 bufferAlertNeeded(
false),
67 virtual bool open(
const Contact& remote);
71 virtual bool openMcast(
const Contact& group,
85 return join(group, sender,
Contact());
107 return remoteAddress;
110 void interrupt()
override;
117 virtual void closeMain();
125 void flush()
override;
127 bool isOk()
const override;
129 void reset()
override;
131 void beginPacket()
override;
133 void endPacket()
override;
137 bool setTypeOfService(
int tos)
override;
139 int getTypeOfService()
override;
147 void removeMonitor();
159 bool closed, interrupting, reader;
168 int localHandle, remoteHandle;
170 Contact localAddress, remoteAddress, restrictInterfaceIp;
176 bool bufferAlertNeeded;
180 double lastReportTime;
184 void configureSystemBuffers();
A mini-server for performing network communication in the background.
A simple abstraction for a block of bytes.
An abstraction for a block of bytes, with optional responsibility for allocating/destroying that bloc...
Simple specification of the minimum functions needed from output streams.
virtual void write(char ch)
Write a single byte to the stream.
A stream which can be asked to perform bidirectional communication.
A stream abstraction for datagram communication.
void setMonitor(const yarp::os::Bytes &data)
virtual void onMonitorInput()
const Contact & getRemoteAddress() const override
Get the address of the remote side of the stream.
const Contact & getLocalAddress() const override
Get the address of the local side of the stream.
void close() override
Terminate the stream.
InputStream & getInputStream() override
Get an InputStream to read from.
virtual void onMonitorOutput()
virtual bool openMonitor(int readSize=0, int writeSize=0)
virtual bool join(const Contact &group, bool sender)
OutputStream & getOutputStream() override
Get an OutputStream to write to.
The components from which ports and connections are built.