20 #ifndef CO_BUFFER_CONNECTION_H 21 #define CO_BUFFER_CONNECTION_H 23 #include <co/connection.h> 24 #include <lunchbox/types.h> 28 namespace detail {
class BufferConnection; }
38 CO_API
virtual ~BufferConnection();
47 CO_API
const lunchbox::Bufferb& getBuffer()
const;
50 CO_API lunchbox::Bufferb& getBuffer();
53 CO_API uint64_t getSize()
const;
58 void readNB(
void*,
const uint64_t )
override { LBDONTCALL; }
59 int64_t
readSync(
void*,
const uint64_t,
const bool )
override 60 { LBDONTCALL;
return -1; }
61 CO_API int64_t write(
const void* buffer,
62 const uint64_t bytes)
override;
68 detail::BufferConnection*
const _impl;
71 typedef lunchbox::RefPtr< BufferConnection > BufferConnectionPtr;
72 typedef lunchbox::RefPtr< const BufferConnection > ConstBufferConnectionPtr;
75 #endif // CO_BUFFER_CONNECTION_H Notifier getNotifier() const override
int64_t readSync(void *, const uint64_t, const bool) override
Finish reading data from the connection.
int Notifier
The Notifier used by the ConnectionSet to detect readiness of a Connection.
Object-oriented network library.
An interface definition for communication between hosts.
A proxy connection buffering outgoing data into a memory buffer.
void readNB(void *, const uint64_t) override
Start a read operation on the connection.
lunchbox::RefPtr< Connection > ConnectionPtr
A reference pointer for Connection pointers.