ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/c++/socket++-1.10/pipestream.h
Revision: 1.2
Committed: Mon Jun 10 14:10:44 2002 UTC (22 years, 5 months ago) by tdb
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Tidy up of files. These are all old things that are not only no longer used
but are also probably useless to anyone other than us. This saves checking
them out all the time, and makes the "cms/source" tree contain only current
stuff. They'll still exist in the attic's though :)

File Contents

# User Rev Content
1 ab11 1.1 // pipestream.h -*- C++ -*- socket library
2     // Copyright (C) 1992,1993,1994 Gnanasekaran Swaminathan <gs4t@virginia.edu>
3     //
4     // Permission is granted to use at your own risk and distribute this software
5     // in source and binary forms provided the above copyright
6     // notice and this paragraph are preserved on all copies.
7     // This software is provided "as is" with no express or implied warranty.
8     //
9     // Version: 17Oct95 1.10
10    
11     #ifndef _PIPESTREAM_H
12     #define _PIPESTREAM_H
13    
14     #include <sockstream.h>
15    
16     class ipipestream: public isockstream {
17     protected:
18     ipipestream (): ios (0) {}
19     public:
20     ipipestream (const char* cmd);
21     ~ipipestream () { delete ios::rdbuf (); ios::init (0); }
22     };
23    
24     class opipestream: public osockstream {
25     protected:
26     opipestream ():ios(0) {}
27     public:
28     opipestream (const char* cmd);
29     ~opipestream () { delete ios::rdbuf (); ios::init (0); }
30     };
31    
32     class iopipestream: public iosockstream {
33     private:
34     iopipestream(const iopipestream& sp); // no defintion provided
35     iopipestream& operator = (iopipestream&); // no definition provided
36    
37     protected:
38     int sp[2]; // socket pair
39     // childs pid if this is parent and
40     // 0 if this is child if object is created through
41     // iopipstream (sockbuf::type, int).
42     // -1 otherwise;
43     pid_t cpid;
44     iopipestream* next; // next in the chain
45    
46     static iopipestream* head; // list to take care of by fork()
47    
48     public:
49     iopipestream(sockbuf::type ty=sockbuf::sock_stream, int proto=0);
50     iopipestream(const char* cmd);
51     ~iopipestream () { delete ios::rdbuf (); ios::init (0); }
52    
53     pid_t pid () const { return cpid; } // returns cpid
54     static pid_t fork(); // sets cpid of all iopipestream* in the head
55     };
56    
57     #endif // _PIPESTREAM_H