76 ACE_INET_Addr anywhere((u_short)0, (ACE_UINT32)INADDR_ANY);
78 bool ok = stream->open(base, sender) == 0;
80 int myPort = stream->getLocalAddress().getPort();
91 ok = stream->open(base, sender) == 0;
108 return becomeShmemVersionHybridStream(proto, sender);
114 return becomeShmem(proto,
false);
120 return becomeShmem(proto,
true);
const yarp::os::LogComponent & SHMEMCARRIER()
bool respondToHeader(yarp::os::ConnectionState &proto) override
Respond to the header.
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
bool expectReplyToHeader(yarp::os::ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
bool checkHeader(const yarp::os::Bytes &header) override
Given the first 8 bytes received on a connection, decide if this is the right carrier type to use for...
bool isConnectionless() const override
Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).
void getHeader(yarp::os::Bytes &header) const override
Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to se...
Carrier * create() const override
Factory method.
void setParameters(const yarp::os::Bytes &header) override
Configure this carrier based on the first 8 bytes of the connection.
virtual int getSpecifierCode() const
A stream abstraction for shared memory communication.
int getSpecifier(const Bytes &b) const
void writeYarpInt(int n, ConnectionState &proto)
Write n as an 8 bytes yarp number.
void createStandardHeader(int specifier, yarp::os::Bytes &header) const
int readYarpInt(ConnectionState &proto)
Read 8 bytes and interpret them as a YARP number.
A simple abstraction for a block of bytes.
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
The basic state of a connection - route, streams in use, etc.
virtual TwoWayStream & getStreams()=0
Access the streams associated with the connection.
virtual void takeStreams(TwoWayStream *streams)=0
Provide streams to be used with the connection.
virtual const Contact & getLocalAddress() const =0
Get the address of the local side of the stream.
#define yCAssert(component, x)