Chapter 8. Some Simple Streams

Table of Contents
WvFile - accessing Unix files
WvFileWatcher - waiting for a file to change
WvPipe - talking to subtasks
WvModem - baud rates and terminal modes

Let's look at a few streams that are only slightly more complicated than WvStream itself: WvFile, WvFileWatcher, and WvPipe.

WvFile - accessing Unix files

WvFile is the simplest WvStream-derivative around. All it does is open a Unix file for you given a filename, so you don't have to supply the fd yourself.

Need we say more?

Oh, since Unix devices are just files, you can use them with WvFile just as easily. For example, if your modem is /dev/ttyS2, you can connect to it by creating a WvFile that refers to /dev/ttyS2. Of course, the WvModem class is probably more useful for that particular job.