-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathAdapterDefault.h
More file actions
35 lines (28 loc) · 767 Bytes
/
AdapterDefault.h
File metadata and controls
35 lines (28 loc) · 767 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
27
28
29
30
31
32
33
34
35
#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;
};
}