reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::TlsConnection Class Reference

#include <TlsConnection.hxx>

Inheritance diagram for resip::TlsConnection:
[legend]

Public Types

enum  TlsState { Initial , Broken , Handshaking , Up }
 
typedef enum resip::TlsConnection::TlsState TlsState
 
- Public Types inherited from resip::ConnectionBase
enum  { ChunkSize = 8192 }
 

Public Member Functions

 RESIP_HeapCount (TlsConnection)
 
 TlsConnection (Transport *transport, const Tuple &who, Socket fd, Security *security, bool server, Data domain, SecurityTypes::SSLType sslType, Compression &compression)
 
virtual ~TlsConnection ()
 
int read (char *buf, const int count)
 pure virtual, but need concrete Connection for book-ends of lists
 
int write (const char *buf, const int count)
 pure virtual, but need concrete Connection for book-ends of lists
 
virtual bool hasDataToRead ()
 always true – always add to fdset as read ready
 
virtual bool isGood ()
 has valid connection
 
virtual bool isWritable ()
 
virtual bool transportWrite ()
 
void getPeerNames (std::list< Data > &peerNames) const
 
const Data & getSni () const
 SNI the client sent in its ClientHello, for connections we accepted (server mode); empty if it sent none, and for client mode connections.
 
- Public Member Functions inherited from resip::Connection
 Connection (Transport *transport, const Tuple &who, Socket socket, Compression &compression, bool isServer)
 
virtual ~Connection ()
 
Socket getSocket () const
 
virtual bool checkConnectionTimedout ()
 
void requestWrite (SendData *sendData)
 queue data to write and add this to writable list
 
int performWrite ()
 send some or all of a queued data; remove from writable if completely written
 
bool performWrites (unsigned int max=0)
 Call performWrite() repeatedly, until either the send queue is exhausted, the write() call fails (probably because the fd is no longer ready to write), or a set number of writes has been performed.
 
void ensureWritable ()
 ensure that we are on the writeable list if required
 
int read ()
 move data from the connection to the buffer; move this to front of least recently used list.
 
bool performReads (unsigned int max=0)
 Call read() repeatedly, until an error occurs (because the fd is not ready to read, most likely).
 
void enableFlowTimer ()
 Ensures this connection is in the FlowTimer LRU list in the connection manager.
 
bool isFlowTimerEnabled ()
 
bool isServer () const
 
- Public Member Functions inherited from resip::ConnectionBase
 ConnectionBase (Transport *transport, const Tuple &who, Compression &compression=Compression::Disabled)
 
FlowKey getFlowKey () const
 
virtual Transport * transport () const
 
Tuple & who ()
 
const uint64_t & whenLastUsed ()
 
void resetLastUsed ()
 
void addAdditionalFailureString (const Data &additionalFailureString)
 
- Public Member Functions inherited from resip::IntrusiveListElement< P >
 IntrusiveListElement ()
 
virtual ~IntrusiveListElement ()
 
bool empty () const
 
iterator begin ()
 
iterator end ()
 
void push_front (P elem)
 
void push_back (P elem)
 
void remove ()
 
- Public Member Functions inherited from resip::IntrusiveListElement1< P >
 IntrusiveListElement1 ()
 
virtual ~IntrusiveListElement1 ()
 
bool empty () const
 
iterator begin ()
 
iterator end ()
 
void push_front (P elem)
 
void push_back (P elem)
 
void remove ()
 
- Public Member Functions inherited from resip::IntrusiveListElement2< P >
 IntrusiveListElement2 ()
 
virtual ~IntrusiveListElement2 ()
 
bool empty () const
 
iterator begin ()
 
iterator end ()
 
void push_front (P elem)
 
void push_back (P elem)
 
void remove ()
 
- Public Member Functions inherited from resip::IntrusiveListElement3< P >
 IntrusiveListElement3 ()
 
virtual ~IntrusiveListElement3 ()
 
bool empty () const
 
iterator begin ()
 
iterator end ()
 
void push_front (P elem)
 
void push_back (P elem)
 
void remove ()
 
- Public Member Functions inherited from resip::FdPollItemIf
 FdPollItemIf ()
 
virtual ~FdPollItemIf ()
 

Static Public Member Functions

static const char * fromState (TlsState)
 
- Static Public Member Functions inherited from resip::Connection
static void setEnablePostConnectSocketFuncCall (bool enabled=true)
 
- Static Public Member Functions inherited from resip::ConnectionBase
static void setMessageSizeMax (size_t max)
 
- Static Public Member Functions inherited from resip::IntrusiveListElement< P >
static P makeList (P elem)
 
- Static Public Member Functions inherited from resip::IntrusiveListElement1< P >
static P makeList (P elem)
 
- Static Public Member Functions inherited from resip::IntrusiveListElement2< P >
static P makeList (P elem)
 
- Static Public Member Functions inherited from resip::IntrusiveListElement3< P >
static P makeList (P elem)
 

Additional Inherited Members

- Public Attributes inherited from resip::Connection
bool mFirstWriteAfterConnectedPending
 
- Static Public Attributes inherited from resip::Connection
static volatile bool mEnablePostConnectSocketFuncCall = false
 
- Protected Types inherited from resip::ConnectionBase
enum  ConnState {
  NewMessage = 0 , ReadingHeaders , PartialBody , SigComp ,
  WebSocket , MAX
}
 
enum  TransmissionFormat {
  Unknown , Uncompressed , Compressed , WebSocketHandshake ,
  WebSocketData
}
 
- Protected Member Functions inherited from resip::Connection
virtual void onDoubleCRLF ()
 
virtual void onSingleCRLF ()
 
virtual void onWsClose (const Data &payload)
 
virtual void onWsPing (const Data &payload)
 
virtual void processPollEvent (FdPollEventMask mask)
 Virtual function of FdPollItemIf, called to process io events.
 
virtual void invokeAfterSocketCreationFunc () const
 
- Protected Member Functions inherited from resip::ConnectionBase
ConnState getCurrentState () const
 
bool preparseNewBytes (int bytesRead)
 
bool wsProcessHandshake (int bytesRead, bool &dropConnection)
 
bool wsProcessData (int bytesRead)
 
void wsParseCookies (CookieList &cookieList, const SipMessage *message)
 
void decompressNewBytes (int bytesRead)
 
std::pair< char *, size_t > getWriteBuffer ()
 
std::pair< char *, size_t > getCurrentWriteBuffer ()
 
char * getWriteBufferForExtraBytes (int bytesRead, int extraBytes)
 
void setBuffer (char *bytes, int count)
 
void setFailureReason (TransportFailure::FailureReason failReason, int subCode, const Data &failureString)
 
virtual ~ConnectionBase ()
 
- Protected Attributes inherited from resip::ConnectionBase
Data::size_type mSendPos
 
std::list< SendData * > mOutstandingSends
 
Transport * mTransport
 
Tuple mWho
 
TransportFailure::FailureReason mFailureReason
 
int mFailureSubCode
 
Data mFailureString
 
std::list< Data > mAdditionalFailureStrings
 
Compression & mCompression
 
osc::Stack * mSigcompStack
 
osc::TcpStream * mSigcompFramer
 
TransmissionFormat mSendingTransmissionFormat
 
TransmissionFormat mReceivingTransmissionFormat
 
- Protected Attributes inherited from resip::IntrusiveListElement< P >
P mNext
 
P mPrev
 
- Protected Attributes inherited from resip::IntrusiveListElement1< P >
P mNext
 
P mPrev
 
- Protected Attributes inherited from resip::IntrusiveListElement2< P >
P mNext
 
P mPrev
 
- Protected Attributes inherited from resip::IntrusiveListElement3< P >
P mNext
 
P mPrev
 

Detailed Description

Definition at line 32 of file TlsConnection.hxx.

Member Typedef Documentation

◆ TlsState

Member Enumeration Documentation

◆ TlsState

Enumerator
Initial 
Broken 
Handshaking 
Up 

Definition at line 59 of file TlsConnection.hxx.

Constructor & Destructor Documentation

◆ TlsConnection()

TlsConnection::TlsConnection ( Transport *  transport,
const Tuple &  who,
Socket  fd,
Security *  security,
bool  server,
Data  domain,
SecurityTypes::SSLType  sslType,
Compression &  compression 
)

Definition at line 32 of file TlsConnection.cxx.

◆ ~TlsConnection()

TlsConnection::~TlsConnection ( )
virtual

Definition at line 116 of file TlsConnection.cxx.

Member Function Documentation

◆ fromState()

const char * TlsConnection::fromState ( TlsConnection::TlsState  s)
static

Definition at line 149 of file TlsConnection.cxx.

◆ getPeerNames()

void TlsConnection::getPeerNames ( std::list< Data > &  peerNames) const

Definition at line 751 of file TlsConnection.cxx.

◆ getSni()

const Data & resip::TlsConnection::getSni ( ) const
inline

SNI the client sent in its ClientHello, for connections we accepted (server mode); empty if it sent none, and for client mode connections.

Only valid once the handshake has completed.

Definition at line 57 of file TlsConnection.hxx.

◆ hasDataToRead()

bool TlsConnection::hasDataToRead ( )
virtual

always true – always add to fdset as read ready

Reimplemented from resip::Connection.

Definition at line 683 of file TlsConnection.cxx.

◆ isGood()

bool TlsConnection::isGood ( )
virtual

has valid connection

Reimplemented from resip::Connection.

Definition at line 704 of file TlsConnection.cxx.

◆ isWritable()

bool TlsConnection::isWritable ( )
virtual

Reimplemented from resip::Connection.

Definition at line 730 of file TlsConnection.cxx.

◆ read()

int TlsConnection::read ( char *  ,
const int   
)
virtual

pure virtual, but need concrete Connection for book-ends of lists

Reimplemented from resip::Connection.

Definition at line 437 of file TlsConnection.cxx.

◆ RESIP_HeapCount()

resip::TlsConnection::RESIP_HeapCount ( TlsConnection  )

◆ transportWrite()

bool TlsConnection::transportWrite ( )
virtual

Reimplemented from resip::Connection.

Definition at line 587 of file TlsConnection.cxx.

◆ write()

int TlsConnection::write ( const char *  ,
const int   
)
virtual

pure virtual, but need concrete Connection for book-ends of lists

Reimplemented from resip::Connection.

Definition at line 612 of file TlsConnection.cxx.


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