// $Id$
//
-// Copyright (C) 2007
-// Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Copyright (C) 2007
+// 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
/** \file
\brief SocketSource public header */
-#ifndef HH_SocketSource_
-#define HH_SocketSource_ 1
+#ifndef HH_SENF_PPI_SocketSource_
+#define HH_SENF_PPI_SocketSource_ 1
// Custom includes
#include "../Packets/Packets.hh"
class DgramReader
{
public:
+ typedef Packet PacketType;
typedef senf::ClientSocketHandle<
senf::MakeSocketPolicy< senf::ReadablePolicy,
senf::DatagramFramingPolicy >::policy > Handle;
{
public:
typedef unspecified_type Handle; // type of handle requested
+ typedef unspecified_type PacketType // type of packet returned
SomeReader(); // EITHER default constructible
SomeReader(SomeReader const & other); // OR copy constructible
- Packet operator()(Handle handle); // extraction function
+ PacketType operator()(Handle handle); // extraction function
};
\endcode
Whenever the FileHandle object is ready for reading, the \a Reader's \c operator() is called
public:
typedef typename Reader::Handle Handle; ///< Handle type requested by the reader
- connector::ActiveOutput<> output; ///< Output connector to which the data received is written
+ connector::ActiveOutput<typename Reader::PacketType> output;
+ ///< Output connector to which the data received is written
ActiveSocketSource(Handle handle); ///< Create new reader for the given handle
/**< Data will be read from \a handle and be parsed by \a