ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/c++/socket++-1.10/echo.h
Revision: 1.2
Committed: Mon Jun 10 14:10:44 2002 UTC (22 years, 3 months ago) by tdb
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Error occurred while calculating annotation data.
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

# Content
1 // echo.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 ECHO_H
12 #define ECHO_H
13
14 #include <protocol.h>
15
16 class echo: public protocol
17 {
18 public:
19 class echobuf: public protocol::protocolbuf {
20 public:
21 echobuf (sockbuf& si): protocol::protocolbuf (si) {}
22 echobuf (protocol::p_name pname) : protocol::protocolbuf (pname) {}
23
24 virtual void serve_clients (int portno = -1);
25 virtual const char* rfc_name () const { return "echo"; }
26 virtual const char* rfc_doc () const { return "rfc862"; }
27 };
28
29 protected:
30 echo (): ios(0) {}
31
32 public:
33 echo (protocol::p_name pname)
34 : ios (0)
35 {
36 ios::init (new echobuf (pname));
37 }
38 ~echo () { delete ios::rdbuf (); ios::init (0); }
39
40 echobuf* rdbuf () { return (echobuf*) protocol::rdbuf (); }
41 echobuf* operator -> () { return rdbuf (); }
42 };
43
44 #endif // !ECHO_H