class mrpt::io::CPipeReadEndPoint

Overview

The read end-point in a pipe created with mrpt::synch::CPipe.

Use the method CStream::Read() of the base class CStream for blocking reading.

#include <mrpt/io/CPipe.h>

class CPipeReadEndPoint: public mrpt::io::CPipeBaseEndPoint
{
public:
    // construction

    CPipeReadEndPoint(const std::string& serialized);

    // methods

    virtual size_t Write(const void* Buffer, size_t Count);
};

Inherited Members

public:
    // fields

    unsigned int timeout_read_start_us {0};
    unsigned int timeout_read_between_us {0};

    // methods

    virtual size_t Read(void* Buffer, size_t Count) = 0;
    virtual size_t Write(const void* Buffer, size_t Count) = 0;
    virtual uint64_t getTotalBytesCount() const = 0;
    virtual uint64_t getPosition() const = 0;
    CPipeBaseEndPoint& operator = (const CPipeBaseEndPoint&);
    std::string serialize();
    bool isOpen() const;
    void close();
    virtual size_t Read(void* Buffer, size_t Count);
    virtual size_t Write(const void* Buffer, size_t Count);
    virtual uint64_t Seek(int64_t of, CStream::TSeekOrigin o = sFromBeginning);
    virtual uint64_t getTotalBytesCount() const;
    virtual uint64_t getPosition() const;

Construction

CPipeReadEndPoint(const std::string& serialized)

De-serializes one end-point description, for example, from a parent process.

Methods

virtual size_t Write(const void* Buffer, size_t Count)

Read-only pipe, don’t call this method.