// $Id$
//
// Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
//
// 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
///////////////////////////////hh.p////////////////////////////////////////
namespace senf {
-
namespace test {
- class SomeProtocol
- : public ConcreteSocketProtocol<SomeSocketPolicy>
+ class SomeSocketProtocol
+ : public ConcreteSocketProtocol<SomeSocketPolicy,SomeSocketProtocol>
{
public:
- ~SomeProtocol() {}
+ ~SomeSocketProtocol() {}
- void init_client() const {}
- void init_server() const {}
+ void init_client() const { fd(0); }
+ void init_server() const { fd(0); }
- std::auto_ptr<SocketProtocol> clone() const
- { return std::auto_ptr<SocketProtocol>(new SomeProtocol()); }
unsigned available() const
{ return Policy::ReadPolicy::TEST_SIZE; }
bool eof() const
{ return false; }
+
+ virtual void close() const {
+ closeCount(1);
+ }
+
+ static unsigned closeCount(unsigned inc=0) {
+ static unsigned counter (0);
+ counter += inc;
+ return counter;
+ }
};
}}
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
// compile-command: "scons -u test"
+// comment-column: 40
// End: