mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
Kernel+LibC+UserspaceEmulator: Add SO_TIMESTAMP, and cmsg definitions
When SO_TIMESTAMP is set as an option on a SOCK_DGRAM socket, then recvmsg() will return a SCM_TIMESTAMP control message that contains a struct timeval with the system time that was current when the socket was received.
This commit is contained in:
parent
ae5ba4074d
commit
47b3e98af8
6 changed files with 94 additions and 2 deletions
|
@ -135,6 +135,8 @@ public:
|
|||
bool has_send_timeout() const { return m_send_timeout.tv_sec || m_send_timeout.tv_usec; }
|
||||
const timeval& send_timeout() const { return m_send_timeout; }
|
||||
|
||||
bool wants_timestamp() const { return m_timestamp; }
|
||||
|
||||
protected:
|
||||
Socket(int domain, int type, int protocol);
|
||||
|
||||
|
@ -172,6 +174,7 @@ private:
|
|||
|
||||
timeval m_receive_timeout { 0, 0 };
|
||||
timeval m_send_timeout { 0, 0 };
|
||||
int m_timestamp { 0 };
|
||||
|
||||
NonnullRefPtrVector<Socket> m_pending;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue