X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketProtocol.test.hh;h=d03e6df92d1c24ae35177869b975ab7d11bf42ee;hb=fd3a0e8ac95d1158e9ea661ddf9187b67c70169f;hp=047a6a9338d445f6ccb60cc770a1719a1a37b4f8;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Socket/SocketProtocol.test.hh b/Socket/SocketProtocol.test.hh index 047a6a9..d03e6df 100644 --- a/Socket/SocketProtocol.test.hh +++ b/Socket/SocketProtocol.test.hh @@ -1,9 +1,9 @@ // $Id$ // -// Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Copyright (C) 2006 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -20,8 +20,8 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef HH_SocketProtocol_test_ -#define HH_SocketProtocol_test_ 1 +#ifndef HH_SENF_Socket_SocketProtocol_test_ +#define HH_SENF_Socket_SocketProtocol_test_ 1 // Custom includes #include "SocketProtocol.hh" @@ -31,28 +31,35 @@ //#include "SocketProtocol.test.mpp" ///////////////////////////////hh.p//////////////////////////////////////// -namespace satcom { -namespace lib { +namespace senf { namespace test { - class SomeProtocol - : public ConcreteSocketProtocol + class SomeSocketProtocol + : public ConcreteSocketProtocol { public: - ~SomeProtocol() {} - - void init_client() const {} - void init_server() const {} + ~SomeSocketProtocol() {} - std::auto_ptr clone() const - { return std::auto_ptr(new SomeProtocol()); } - unsigned available() const + void init_client() const { fd(0); } + void init_server() const { fd(0); } + + unsigned available() const { return Policy::ReadPolicy::TEST_SIZE; } - bool eof() const + bool eof() const { return false; } + + virtual void close() { + closeCount(1); + } + + static unsigned closeCount(unsigned inc=0) { + static unsigned counter (0); + counter += inc; + return counter; + } }; -}}} +}} ///////////////////////////////hh.e//////////////////////////////////////// //#include "SocketProtocol.test.cci" @@ -64,5 +71,10 @@ namespace test { // Local Variables: // mode: c++ -// c-file-style: "satcom" +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: