1
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
// % Project : GUSI - Grand Unified Socket Interface
3
// % File : GUSIPipe.nw - Pipes
4
// % Author : Matthias Neeracher
7
// % $Log: GUSIPipe.h,v $
8
// % Revision 1.1 2001/03/11 22:37:35 sgehani%netscape.com
11
// % Revision 1.12 2000/05/23 07:18:03 neeri
12
// % Improve formatting
14
// % Revision 1.11 2000/03/06 06:09:59 neeri
15
// % Reorganize Yield()
17
// % Revision 1.10 1999/11/15 07:20:59 neeri
18
// % Add GUSIwithLocalSockets
20
// % Revision 1.9 1999/08/26 05:45:07 neeri
21
// % Fixes for literate edition of source code
23
// % Revision 1.8 1999/06/28 06:05:00 neeri
24
// % Support interrupted calls
26
// % Revision 1.7 1999/05/29 06:26:45 neeri
27
// % Fixed header guards
29
// % Revision 1.6 1999/03/17 09:05:12 neeri
30
// % Added GUSITimer, expanded docs
32
// % Revision 1.5 1998/11/22 23:07:00 neeri
33
// % Releasing 2.0a4 in a hurry
35
// % Revision 1.4 1998/10/25 11:57:38 neeri
36
// % Ready to release 2.0a3
38
// % Revision 1.3 1998/01/25 20:53:57 neeri
39
// % Engine implemented, except for signals & scheduling
41
// % Revision 1.2 1996/12/22 19:57:58 neeri
44
// % Revision 1.1 1996/11/24 12:52:08 neeri
45
// % Added GUSIPipeSockets
47
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49
// \chapter{The GUSI Pipe Socket Class}
51
// Pipes and socket pairs are implemented with the [[GUSIPipeSocket]] class.
52
// The [[GUSIPipeFactory]] singleton creates pairs of [[GUSIPipeSockets]].
60
#include "GUSISocket.h"
61
#include "GUSIFactory.h"
63
// \section{Definition of [[GUSIPipeFactory]]}
65
// [[GUSIPipeFactory]] is a singleton subclass of [[GUSISocketFactory]].
67
// <Definition of class [[GUSIPipeFactory]]>=
68
class GUSIPipeFactory : public GUSISocketFactory {
70
static GUSISocketFactory * Instance();
71
virtual GUSISocket * socket(int domain, int type, int protocol);
72
virtual int socketpair(int domain, int type, int protocol, GUSISocket * s[2]);
75
static GUSISocketFactory * sInstance;
78
// <Inline member functions for class [[GUSIPipeFactory]]>=
79
inline GUSISocketFactory * GUSIPipeFactory::Instance()
82
sInstance = new GUSIPipeFactory;
86
#endif /* GUSI_INTERNAL */
88
#endif /* _GUSIPipe_ */