join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
DtlsSocket Class Reference

Class used to test the datagram TLS wrapper API. More...

Inheritance diagram for DtlsSocket:
Collaboration diagram for DtlsSocket:

Static Public Member Functions

static void SetUpTestCase ()
 set up test case.
 
static void TearDownTestCase ()
 tear down test case.
 

Protected Member Functions

void SetUp () override
 Sets up the test fixture.
 
void TearDown () override
 Tears down the test fixture.
 
virtual void onReadable (int fd) override
 method called when data are ready to be read on handle.
 
- Protected Member Functions inherited from join::EventHandler
virtual void onEvent (int fd, uint32_t revents)
 method called when events are reported on handle.
 
virtual void onWriteable (int fd)
 method called when data are ready to be written on handle.
 
virtual void onClose (int fd)
 method called when handle was closed by the peer.
 
virtual void onError (int fd)
 method called when an error occurred on handle.
 

Protected Attributes

TlsContext _tlsContext {TlsContext::DtlsServer}
 TLS context serveur.
 
Dtls::Socket _socket {_tlsContext, Udp::Socket::NonBlocking}
 socket.
 

Static Protected Attributes

static const std::string _hostv4 = "127.0.0.1"
 host.
 
static const std::string _hostv6 = "::1"
 
static const uint16_t _port = 5000
 port.
 
static const std::chrono::milliseconds _timeout {1000}
 timeout.
 
static const std::string _rootcert = "/tmp/tlssocket_test_root.cert"
 root certificate.
 
static const std::string _certPath = "/tmp/certs"
 certificate path.
 
static const std::string _certFile = _certPath + "/tlssocket_test.cert"
 certificate file.
 
static const std::string _key = "/tmp/tlssocket_test.key"
 private key.
 
static const std::string _invalidKey = "/tmp/tlssocket_test_invalid.key"
 invalid private key.
 

Additional Inherited Members

- Public Member Functions inherited from join::EventHandler
 EventHandler ()=default
 create instance.
 
 EventHandler (const EventHandler &other)=default
 copy constructor.
 
EventHandleroperator= (const EventHandler &other)=default
 copy assignment operator.
 
 EventHandler (EventHandler &&other)=default
 move constructor.
 
EventHandleroperator= (EventHandler &&other)=default
 move assignment operator.
 
virtual ~EventHandler ()=default
 destroy instance.
 

Detailed Description

Class used to test the datagram TLS wrapper API.

Member Function Documentation

◆ onReadable()

virtual void DtlsSocket::onReadable ( int fd)
inlineoverrideprotectedvirtual

method called when data are ready to be read on handle.

Parameters
fdfile descriptor.

Reimplemented from join::EventHandler.

◆ SetUp()

void DtlsSocket::SetUp ( )
inlineoverrideprotected

Sets up the test fixture.

◆ SetUpTestCase()

static void DtlsSocket::SetUpTestCase ( )
inlinestatic

set up test case.

◆ TearDown()

void DtlsSocket::TearDown ( )
inlineoverrideprotected

Tears down the test fixture.

◆ TearDownTestCase()

static void DtlsSocket::TearDownTestCase ( )
inlinestatic

tear down test case.

Member Data Documentation

◆ _certFile

const std::string DtlsSocket::_certFile = _certPath + "/tlssocket_test.cert"
staticprotected

certificate file.

◆ _certPath

const std::string DtlsSocket::_certPath = "/tmp/certs"
staticprotected

certificate path.

◆ _hostv4

const std::string DtlsSocket::_hostv4 = "127.0.0.1"
staticprotected

host.

◆ _hostv6

const std::string DtlsSocket::_hostv6 = "::1"
staticprotected

◆ _invalidKey

const std::string DtlsSocket::_invalidKey = "/tmp/tlssocket_test_invalid.key"
staticprotected

invalid private key.

◆ _key

const std::string DtlsSocket::_key = "/tmp/tlssocket_test.key"
staticprotected

private key.

◆ _port

const uint16_t DtlsSocket::_port = 5000
staticprotected

port.

◆ _rootcert

const std::string DtlsSocket::_rootcert = "/tmp/tlssocket_test_root.cert"
staticprotected

root certificate.

◆ _socket

Dtls::Socket DtlsSocket::_socket {_tlsContext, Udp::Socket::NonBlocking}
protected

socket.

◆ _timeout

const std::chrono::milliseconds DtlsSocket::_timeout {1000}
staticprotected

timeout.

◆ _tlsContext

TlsContext DtlsSocket::_tlsContext {TlsContext::DtlsServer}
protected

TLS context serveur.


The documentation for this class was generated from the following file: