plan9 man page for stream

Query: stream

OS: plan9

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

STREAM(3)						     Library Functions Manual							 STREAM(3)

NAME
stream - a structure for communications
SYNOPSIS
bind streamdevice dir dir/data dir/ctl
DESCRIPTION
A stream is not a device per se. However, many devices use the streams package in the kernel to implement communications channels. The properties described here are common to all such channels. All streams are represented by two standard files, ctl and data, plus any others the particular device wants to add. Reading and writing the data file receives and sends data on the channel. If the channel is message oriented, each write will represent a message and each read will return at most one message. If the buffer given in a read is smaller than the message, subsequent reads will return the remain- der of the message. Writing textual command strings to the ctl file performs control operations on the stream. The strings need not be null-terminated. Each device may add to the control operations. The common control operations are: hangup Hang up this stream. Any subsequent writes will return an error. The first subsequent read will return 0. All following ones will return an error. push name Push the module name onto the top of the stream. pop Pop the top module off the stream Reading the ctl file returns a textual identifier for the stream. This is used by multiplexed devices and its use is described with the particular device.
SEE ALSO
pipe(3), dk(3), cons(3), async(3), fcall(3), ip(3), reboot(3)
SOURCE
/sys/src/9/port/st*.c STREAM(3)
Related Man Pages
fcall(3) - plan9
arp(3) - plan9
dk(3) - plan9
ip(3) - plan9
tirdwr(7) - osf1
Similar Topics in the Unix Linux Community
How to use more than one MPE command STREAM with Unix command in a single shell?
Displaying Return Codes
Problem with control file and special character
[Solved] sed to replace words
Cut a string for last 8 characters