forked from awwit/httpserverapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdapterDefault.h
More file actions
26 lines (20 loc) · 740 Bytes
/
AdapterDefault.h
File metadata and controls
26 lines (20 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once
#include "Adapter.h"
#include "Socket.h"
namespace Socket
{
class AdapterDefault : public Adapter
{
private:
Socket sock;
public:
AdapterDefault() = delete;
AdapterDefault(const Socket &_sock) noexcept;
virtual System::native_socket_type get_handle() const noexcept override;
virtual ::gnutls_session_t get_tls_session() const noexcept override;
virtual Adapter *copy() const noexcept override;
virtual long nonblock_recv(void *buf, const size_t length, const std::chrono::milliseconds &timeout) const noexcept override;
virtual long nonblock_send(const void *buf, const size_t length, const std::chrono::milliseconds &timeout) const noexcept override;
virtual void close() noexcept override;
};
}