WvStreams
wvmagicloopback.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2004 Net Integration Technologies, Inc.
4 */
5#ifndef __WVMAGICLOOPBACK_H
6#define __WVMAGICLOOPBACK_H
7
8#include "wvmagiccircle.h"
9#include "wvloopback.h"
10
12{
13public:
14
15 WvMagicLoopback(size_t size);
16
17 virtual void pre_select(SelectInfo &si);
18 virtual bool post_select(SelectInfo &si);
19
20 virtual size_t uread(void *buf, size_t len);
21 virtual size_t uwrite(const void *buf, size_t len);
22
23private:
24
25 WvMagicCircle circle;
26 WvLoopback loop;
27
28public:
29 const char *wstype() const { return "WvMagicLoopback"; }
30};
31
32#endif // __WVMAGICLOOPBACK_H
Implementation of a WvLoopback stream.
Definition wvloopback.h:17
A circular queue that can be accessed across fork().
virtual void pre_select(SelectInfo &si)
pre_select() sets up for eventually calling select().
virtual size_t uread(void *buf, size_t len)
unbuffered I/O functions; these ignore the buffer, which is handled by read().
virtual size_t uwrite(const void *buf, size_t len)
unbuffered I/O functions; these ignore the buffer, which is handled by write().
virtual bool post_select(SelectInfo &si)
post_select() is called after select(), and returns true if this object is now ready.
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
Definition wvstream.h:25
the data structure used by pre_select()/post_select() and internally by select().
Definition iwvstream.h:50