X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FDatagramSocketProtocol.hh;h=dcf5af830123687df23b8657fbb7ba2c772be448;hb=bdcb3db7ad903521f6dd8365b4208f163e0e61f5;hp=a1c014b89da30c245ee77fe97f63faa9e9741311;hpb=14daa84b7c821626ae098bedd93ef07d98bf3a40;p=senf.git diff --git a/Socket/Protocols/DatagramSocketProtocol.hh b/Socket/Protocols/DatagramSocketProtocol.hh index a1c014b..dcf5af8 100644 --- a/Socket/Protocols/DatagramSocketProtocol.hh +++ b/Socket/Protocols/DatagramSocketProtocol.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2007 +// Copyright (C) 2007 // Fraunhofer Institute for Open Communication Systems (FOKUS) // Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund @@ -23,12 +23,13 @@ /** \file \brief DatagramSocketProtocol public header */ -#ifndef HH_DatagramSocketProtocol_ -#define HH_DatagramSocketProtocol_ 1 +#ifndef HH_SENF_Socket_Protocols_DatagramSocketProtocol_ +#define HH_SENF_Socket_Protocols_DatagramSocketProtocol_ 1 // Custom includes #include #include "../../Socket/SocketProtocol.hh" +#include "../../Scheduler/ClockService.hh" //#include "DatagramSocketProtocol.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -44,11 +45,16 @@ namespace senf { : public virtual SocketProtocol { public: - struct timeval timestamp() const; ///< Return packet timestamp of last packet + ClockService::clock_type timestamp() const; ///< Return packet timestamp of last packet /**< The returned timestamp represents the time, at which the last network packet passed to the user has been received from the network. This allows precise network timing. + + The returned value can be converted to the + senf::ClockService::clock_type representation using + semf::ClockService::from_timeval(). + \pre The \c SO_TIMESTAMP socket option must not be set on the socket. \returns timestamp when last packet was received */