// $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
class DgramReader
{
public:
+ typedef Packet PacketType;
typedef senf::ClientSocketHandle<
senf::MakeSocketPolicy< senf::ReadablePolicy,
senf::DatagramFramingPolicy >::policy > Handle;
\code
senf::ppi::module::ActiveSocketSource< senf::ppi::DgramReader<senf::EthernetPacket> > source;
\endcode
- declares a \a reader module reading senf::EthrtnetPacket's.
+ declares a \a reader module reading senf::EthernetPacket's
A \a Reader must fulfill the following interface:
\code
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
Reader & reader(); ///< Access Reader helper
- void replaceHandle(Handle newHandle);
- ///< Replace the handle from which the packets are read
-
private:
void read();