Base Framework
Public Member Functions | List of all members
SSLSocket Class Reference

#include <base/net/SSLSocket.h>

Inherits Resource.

Public Member Functions

void createSecure (StreamSocket socket, const String &pem)
 
void connect (const InetAddress &address, unsigned short port)
 
unsigned int read (uint8 *buffer, unsigned int size, bool nonblocking=false)
 
unsigned int write (const uint8 *buffer, unsigned int size, bool nonblocking=false)
 
- Public Member Functions inherited from Resource
String getDescription () const
 
void setDescription (const String &description)
 
unsigned int getResourceId () const
 
unsigned int getCreatedById () const
 
AnyReference getHandle () const noexcept
 
template<class TYPE >
TYPE & getInternalHandle () const
 
 operator bool () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from Resource
AnyReference handle
 

Detailed Description

SSL Socket.

Member Function Documentation

◆ createSecure()

void SSLSocket::createSecure ( StreamSocket  socket,
const String pem 
)

Creates secure socket.

◆ read()

unsigned int SSLSocket::read ( uint8 *  buffer,
unsigned int  size,
bool  nonblocking = false 
)

Fills the buffer with bytes from the socket input stream. Blocks if asked to read more bytes than available. Raises EndOfFile if end of stream has been reached.

Parameters
bufferThe buffer.
sizeThe size of the buffer.
nonblockingSelect nonblocking mode.
Returns
The actual number of bytes read.

◆ write()

unsigned int SSLSocket::write ( const uint8 *  buffer,
unsigned int  size,
bool  nonblocking = false 
)

Writes bytes in buffer to stream.

Parameters
bufferThe buffer containing the bytes to be written.
sizeThe number of bytes to be written.
nonblockingSelect nonblocking mode.
Returns
The actual number of bytes written.