ArmSys Support
ArmsysApi  0.12.18

#include <BSocketTls.h>

Inheritance diagram for BSocketTls:
BComms

Public Types

enum  Type { TypeNone, TypeUdp, TypeTcp, TypeTcpSsl }
 
- Public Types inherited from BComms
enum  Flush { FlushRead, FlushWrite, FlushReadWrite }
 

Public Member Functions

 BSocketTls (Type type=TypeNone)
 
BError init (Type type)
 
void close ()
 
BError write (const void *buf, BUInt32 nBytes, BUInt32 &nt)
 
BError read (void *buf, BUInt32 nBytes, BUInt32 &nt)
 
BError initSslServer (const BUInt8 *certKey, BUInt certKeyLen, const BUInt8 *certCrc, BUInt certCrcLen)
 
BError bind (const BSocketAddress &address)
 
BError connect (const BSocketAddress &address)
 
BError listen (int backlog=5)
 
BError accept (BSocketTls &socket, BSocketAddress &address)
 
BError send (const void *buf, BUInt32 nBytes, BUInt32 &nt, int flags=0)
 
BError recv (void *buf, BUInt32 nBytes, BUInt32 &nt, int flags=0)
 
BUInt recvAvailable ()
 
- Public Member Functions inherited from BComms
 BComms ()
 
virtual ~BComms ()
 
virtual BError init ()
 
virtual const char * name ()
 The name of this interface. More...
 
virtual BUInt32 byteRate ()
 The byte rate of this interface. More...
 
virtual BError setPacketMode (Bool packetMode)
 Set packet mode. More...
 
virtual Bool packetMode ()
 Device is in packet mode. More...
 
virtual BError setTimeout (BTimeout timeoutUs)
 Set communication timeout. More...
 
virtual BError connect (const char *resource)
 Create a connection. More...
 
virtual Bool isConnected ()
 
virtual BError disconnect ()
 Disconnect. More...
 
virtual void flush (Flush flush)
 
virtual BUInt writeAvailable ()
 
virtual BError writeChunks (const BDataChunk *chunks, BUInt nChunks, BUInt32 &nTrans)
 
virtual BUInt readAvailable ()
 
virtual BError wait (BUInt32 eventSet, BTimeout timeoutUs=BTimeoutForever, BUInt32 num=1)
 
virtual void eventQueue (BEventQueue *eventQueue, BUInt32 event, BUInt32 eventSet, BUInt num=1)
 
virtual void eventEnable (Bool on)
 Enable events to be sent. More...
 

Private Attributes

Type otype
 
mbedtls_net_context osocket
 
mbedtls_entropy_context oentropy
 
mbedtls_ctr_drbg_context octr_drbg
 
mbedtls_ssl_context ossl
 
mbedtls_ssl_config oconf
 
mbedtls_x509_crt osrvcert
 
mbedtls_pk_context opkey
 

Additional Inherited Members

- Protected Attributes inherited from BComms
Bool oconnected
 
Bool opacketMode
 
BTimeout otimeout
 
BEventQueueoeventQueue
 
Bool oeventEnabled
 
BUInt32 oevent
 
BUInt32 oeventSet
 
BUInt oeventNum
 

Member Enumeration Documentation

◆ Type

Enumerator
TypeNone 
TypeUdp 
TypeTcp 
TypeTcpSsl 

Constructor & Destructor Documentation

◆ BSocketTls()

BSocketTls::BSocketTls ( Type  type = TypeNone)

Member Function Documentation

◆ accept()

BError BSocketTls::accept ( BSocketTls socket,
BSocketAddress address 
)

◆ bind()

BError BSocketTls::bind ( const BSocketAddress address)

◆ close()

void BSocketTls::close ( )
virtual

Reimplemented from BComms.

◆ connect()

BError BSocketTls::connect ( const BSocketAddress address)

◆ init()

BError BSocketTls::init ( Type  type)

◆ initSslServer()

BError BSocketTls::initSslServer ( const BUInt8 certKey,
BUInt  certKeyLen,
const BUInt8 certCrc,
BUInt  certCrcLen 
)

◆ listen()

BError BSocketTls::listen ( int  backlog = 5)

◆ read()

BError BSocketTls::read ( void *  buf,
BUInt32  nBytes,
BUInt32 nt 
)
virtual

Implements BComms.

◆ recv()

BError BSocketTls::recv ( void *  buf,
BUInt32  nBytes,
BUInt32 nt,
int  flags = 0 
)

◆ recvAvailable()

BUInt BSocketTls::recvAvailable ( )

◆ send()

BError BSocketTls::send ( const void *  buf,
BUInt32  nBytes,
BUInt32 nt,
int  flags = 0 
)

◆ write()

BError BSocketTls::write ( const void *  buf,
BUInt32  nBytes,
BUInt32 nt 
)
virtual

Implements BComms.

Member Data Documentation

◆ oconf

mbedtls_ssl_config BSocketTls::oconf
private

◆ octr_drbg

mbedtls_ctr_drbg_context BSocketTls::octr_drbg
private

◆ oentropy

mbedtls_entropy_context BSocketTls::oentropy
private

◆ opkey

mbedtls_pk_context BSocketTls::opkey
private

◆ osocket

mbedtls_net_context BSocketTls::osocket
private

◆ osrvcert

mbedtls_x509_crt BSocketTls::osrvcert
private

◆ ossl

mbedtls_ssl_context BSocketTls::ossl
private

◆ otype

Type BSocketTls::otype
private

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