Protocol facet providing generic BSD datagram socket functionality. More...
#include <senf/Socket/Protocols/DatagramSocketProtocol.hh>
Inherits senf::SocketProtocol.
Inherited by senf::ConnectedRawV4SocketProtocol, senf::ConnectedRawV6SocketProtocol, senf::ConnectedUDPv4SocketProtocol, senf::ConnectedUDPv6SocketProtocol, senf::PacketSocketProtocol, senf::RawV4SocketProtocol, senf::RawV6SocketProtocol, senf::UDPv4SocketProtocol, and senf::UDPv6SocketProtocol.
Public Member Functions | |
void | timestamp (struct timespec *spec) const |
Return packet timestamp of last packet. More... | |
ClockService::clock_type | timestamp () const |
Return packet timestamp of last packet. More... | |
Public Member Functions inherited from senf::SocketProtocol | |
virtual SocketPolicyBase const & | policy () const =0 |
Access the policy instance. More... | |
virtual unsigned | available () const =0 |
Return (maximum) number of bytes available for reading without < blocking. More... | |
virtual bool | eof () const =0 |
Check for end-of-file condition. More... | |
virtual void | close () |
Close socket. More... | |
virtual void | terminate () const |
Forcibly close socket. More... | |
virtual void | state (SocketStateMap &map, unsigned lod) const |
Return socket state information. More... | |
int | fd () const |
Get file descriptor. More... | |
SocketProtocol () | |
virtual | ~SocketProtocol ()=0 |
Additional Inherited Members | |
Protected Member Functions inherited from senf::SocketProtocol | |
FileHandle | fh () const |
Get a FileHandle for this instance. More... | |
void | fd (int) const |
Initialize file descriptor. More... | |
Protocol facet providing generic BSD datagram socket functionality.
Definition at line 35 of file DatagramSocketProtocol.hh.
void senf::DatagramSocketProtocol::timestamp | ( | struct timespec * | spec | ) | const |
Return packet timestamp of last packet.
Definition at line 40 of file DatagramSocketProtocol.cc.
senf::ClockService::clock_type senf::DatagramSocketProtocol::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.
SO_TIMESTAMP
socket option must not be set on the socket. Definition at line 31 of file DatagramSocketProtocol.cc.