2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief SocketSink inline template implementation */
17 //#include "SocketSink.ih"
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::ppi::TargetDgramWriter<HandleType>
27 template <class HandleType>
28 prefix_ senf::ppi::TargetDgramWriter<HandleType>::TargetDgramWriter()
31 template <class HandleType>
32 prefix_ senf::ppi::TargetDgramWriter<HandleType>::
33 TargetDgramWriter(typename Handle::Address const & target)
37 template <class HandleType>
38 prefix_ typename senf::ppi::TargetDgramWriter<HandleType>::Handle::Address
39 senf::ppi::TargetDgramWriter<HandleType>::target()
45 template <class HandleType>
47 senf::ppi::TargetDgramWriter<HandleType>::target(typename Handle::Address const & target)
52 template <class HandleType>
53 prefix_ bool senf::ppi::TargetDgramWriter<HandleType>::operator()(Handle & handle,
54 Packet const & packet)
57 return handle.writeto(target_, packet.data()) != packet.data().begin();
61 //-/////////////////////////////////////////////////////////////////////////////////////////////////
62 // senf::ppi::module::ActiveSocketSink<Writer>
64 template <class Writer>
65 prefix_ Writer & senf::ppi::module::ActiveSocketSink<Writer>::writer()
70 template <class Writer>
71 prefix_ typename senf::ppi::module::ActiveSocketSink<Writer>::Handle
72 senf::ppi::module::ActiveSocketSink<Writer>::handle()
77 template <class Writer>
78 prefix_ void senf::ppi::module::ActiveSocketSink<Writer>::handle(Handle const & handle)
81 event_.set(handle_, IOEvent::Write);
84 //-/////////////////////////////////////////////////////////////////////////////////////////////////
85 // senf::ppi::module::PassiveSocketSink<Writer>
87 template <class Writer>
88 prefix_ Writer & senf::ppi::module::PassiveSocketSink<Writer>::writer()
93 template <class Writer>
94 prefix_ typename Writer::Handle & senf::ppi::module::PassiveSocketSink<Writer>::handle()
99 template <class Writer>
100 prefix_ void senf::ppi::module::PassiveSocketSink<Writer>::handle(Handle const & handle)
106 //-/////////////////////////////////////////////////////////////////////////////////////////////////
113 // comment-column: 40
114 // c-file-style: "senf"
115 // indent-tabs-mode: nil
116 // ispell-local-dictionary: "american"
117 // compile-command: "scons -u test"