8#include "Arp/System/Core/PimplPtr.hxx"
9#include "Arp/System/Core/event.hxx"
10#include "Arp/System/Commons/Net/Socket.hpp"
11#include "Arp/System/Commons/Net/TlsOptions.hpp"
12#include "Arp/System/Commons/Security/Certificate.hpp"
13#include "Arp/System/Commons/Net/TlsVerificationError.hpp"
14#include "Arp/System/Commons/Net/TlsAlertType.hpp"
15#include "Arp/System/Commons/Net/TlsAlertLevel.hpp"
18namespace Arp {
namespace System {
namespace Commons {
namespace Net
22using TlsContextPtr = std::shared_ptr<TlsContext>;
37 using Ptr = std::shared_ptr<TlsSocket2>;
70 bool IsBlocking(
void);
72 bool IsTlsConnected(
void);
74 int GetRemotePort(
void);
85 int Send(
const void* pBuffer,
size_t length,
SocketError& error);
86 int Receive(
void* pBuffer,
size_t length,
SocketError& error);
100 SocketError SetOptionLinger(
bool enable,
size_t timeout);
101 SocketError GetOptionLinger(
bool& enable,
size_t& timeout);
102 SocketError SetOptionUserTimeout(
size_t timeout_ms);
103 SocketError GetOptionUserTimeout(
size_t& timeout_ms);
104 SocketError SetOptionKeepAliveIdleTime(
int seconds);
105 SocketError GetOptionKeepAliveIdleTime(
int& seconds);
106 SocketError SetOptionKeepAliveProbeInterval(
int seconds);
107 SocketError GetOptionKeepAliveProbeInterval(
int& seconds);
108 SocketError SetOptionKeepAliveProbeCount(
int probeCount);
109 SocketError GetOptionKeepAliveProbeCount(
int& probeCount);
114 void SetCipherList(
const String& cipherList);
117 SocketError UpdateSessionKeys(
bool requestUpdate =
true);
126 void AddAlertReceivedHandler(
const AlertHandler& handler);
127 void RemoveAlertReceivedHandler(
const AlertHandler& handler);
130 void RemoveAlertSendHandler(
const AlertHandler& handler);
136 const Impl& GetImpl(
void)
const;
Adapter class to implement PImpl idiom.
Definition: PimplPtr.hxx:15
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
Prototyping of delegate template.
Definition: delegate.hxx:14
Derive from this class to inherit logging functionality.
Definition: Loggable.hxx:28
Unified representation for ip address schemes.
Definition: IpAddress.hpp:14
std::shared_ptr< Socket > Ptr
Contextual definition of pointer type.
Definition: Socket.hpp:122
Interface to realize TLS Connection over TCP
Definition: TlsSocket2.hpp:32
TlsSocket2(TlsSocket2 &&arg) noexcept
Default move constructor.
~TlsSocket2(void)
Default destructor.
TlsSocket2 & operator=(TlsSocket2 &&arg) noexcept
Default move-assignment operator.
Class to handle x.509 certificates
Definition: Certificate.hpp:25
std::chrono::microseconds Microseconds
The Arp Microseconds unit class.
Definition: ChronoTypes.hpp:40
SteadyClock::time_point SteadyTimePoint
Represents the type of a monotonic clock time-point.
Definition: ChronoTypes.hpp:31
std::chrono::milliseconds Milliseconds
The Arp Milliseconds unit class.
Definition: ChronoTypes.hpp:43
@ Shutdown
A request to send or receive data was disallowed because the socket had already been shut down in tha...
@ IsConnected
A connect request was made on an already connected socket.
TlsVerificationError
This enum list possible error codes which further specifies an certificate verification error....
Definition: TlsVerificationError.hpp:18
PollMode
This enum is used to specifiy the poll mode of the <cref name="Socket::Poll" > operation.
Definition: PollMode.hpp:15
@ Connect
Connect operation should be polled.
@ Accept
Accept operation should be polled.
SelectMode
Modes for Select call to check different data channels.
Definition: SelectMode.hpp:14
TlsAlertType
This enum defines the TLS alert types
Definition: TlsAlertType.hpp:16
SocketDomain
Supported communication domains, selecting the protocol for communication.
Definition: SocketDomain.hpp:14
SocketType
Enumeration of supported socket types.
Definition: SocketType.hpp:14
ShutdownMode
This enum is used to specifiy the shutdown mode of the <cref name="Socket::Shutdown(ShutdownMode)" > ...
Definition: ShutdownMode.hpp:15
SocketError
Possible error codes for socket operation results.
Definition: SocketError.hpp:15
TlsAlertLevel
This enum represents avaliable TLS alert Levels
Definition: TlsAlertLevel.hpp:16
TlsOptions
This enum is used to select different options for the TlsSocket class
Definition: TlsOptions.hpp:25
SocketOptionName
Specifies socket options to be set by the application. Copied from Eclr Socket Adaption
Definition: SocketOptionName.hpp:17
SocketBlockingMode
Supported blocking modes.
Definition: Socket.hpp:28
Root namespace for the PLCnext API