Stream::Provider Class Referenceabstract

Provider of a stream interface. More...

#include <StreamInterface.h>

Inheritance diagram for Stream::Provider:
Stream::SocketPoll

Public Member Functions

 Provider ()
 The user of this provider.
 
virtual ~Provider ()
 Destructor should be virtual.
 
void SetUser (User *u)
 set the user
 
UserGetUser ()
 get the user
 
virtual endpoint_t GetEndpoint (bool inheriting)=0
 Get the endpoint ID, if inheriting, set to be inherited.
 
virtual unsigned Events ()=0
 Get the poller events on the endpoint.
 
virtual int GetLocalAddress (struct sockaddr *laddr, socklen_t *lalenp, MSGstruct *msp)=0
 Get the local address.
 
virtual int GetPeerAddress (struct sockaddr *paddr, socklen_t *palenp, MSGstruct *msp)=0
 Get the local address.
 
virtual TLS_CipherSuite GetCipherSuite ()
 Return the current TLS cipher, if any.
 
virtual X509 * GetPeerCertificate ()
 Return the current TLS client certificate, if any.
 
virtual void Die ()=0
 Go away.
 
virtual void Deliver (External *ext)=0
 Set external.
 
virtual void Deliver (ConnectRequest *req)=0
 connect
 
virtual void Deliver (ListenRequest *req)=0
 listen
 
virtual void Deliver (ConnectAccept *req)=0
 accept
 
virtual void Deliver (DisconnectRequest *req)=0
 disconnect
 
virtual void Deliver (DataRequest *req)=0
 send data
 
virtual void Deliver (ReadRequest *req)=0
 Release read buffer.
 
virtual void Deliver (StartTLS *req)=0
 Start SSL/TLS on stream.
 
virtual void Deliver (StreamControl *option)=0
 Control stream.
 
virtual void Deliver (LengthFnxRequest *req)=0
 Set length function.
 

Static Public Member Functions

static EVENTSVC_DLL ProviderProviderFactory (const char *type, MSGstruct *msp)
 Factory method for Stream provider.
 

Detailed Description

Provider of a stream interface.

Definition at line 129 of file StreamInterface.h.

Constructor & Destructor Documentation

◆ Provider()

Stream::Provider::Provider ( )
inline

The user of this provider.

Constructor

Definition at line 135 of file StreamInterface.h.

135: user(0) {}

◆ ~Provider()

virtual Stream::Provider::~Provider ( )
inlinevirtual

Destructor should be virtual.

Definition at line 138 of file StreamInterface.h.

138{}

Member Function Documentation

◆ SetUser()

void Stream::Provider::SetUser ( User u)
inline

set the user

Definition at line 141 of file StreamInterface.h.

141{ user = u; }

Referenced by Stream::SocketPoll::tidy().

◆ GetUser()

User * Stream::Provider::GetUser ( )
inline

get the user

Definition at line 144 of file StreamInterface.h.

144{ return user; }

◆ GetEndpoint()

virtual endpoint_t Stream::Provider::GetEndpoint ( bool  inheriting)
pure virtual

Get the endpoint ID, if inheriting, set to be inherited.

Implemented in Stream::SocketPoll.

◆ Events()

virtual unsigned Stream::Provider::Events ( )
pure virtual

Get the poller events on the endpoint.

Implemented in Stream::SocketPoll.

◆ GetLocalAddress()

virtual int Stream::Provider::GetLocalAddress ( struct sockaddr *  laddr,
socklen_t *  lalenp,
MSGstruct *  msp 
)
pure virtual

Get the local address.

Implemented in Stream::SocketPoll.

◆ GetPeerAddress()

virtual int Stream::Provider::GetPeerAddress ( struct sockaddr *  paddr,
socklen_t *  palenp,
MSGstruct *  msp 
)
pure virtual

Get the local address.

Implemented in Stream::SocketPoll.

◆ GetCipherSuite()

virtual TLS_CipherSuite Stream::Provider::GetCipherSuite ( )
inlinevirtual

Return the current TLS cipher, if any.

Reimplemented in Stream::SocketPoll.

Definition at line 164 of file StreamInterface.h.

164 {
165 return 0;
166 }

◆ GetPeerCertificate()

virtual X509 * Stream::Provider::GetPeerCertificate ( )
inlinevirtual

Return the current TLS client certificate, if any.

Reimplemented in Stream::SocketPoll.

Definition at line 169 of file StreamInterface.h.

169 {
170 return 0;
171 }

◆ Die()

virtual void Stream::Provider::Die ( )
pure virtual

Go away.

Implemented in Stream::SocketPoll.

◆ Deliver() [1/10]

virtual void Stream::Provider::Deliver ( External ext)
pure virtual

Set external.

Implemented in Stream::SocketPoll.

◆ Deliver() [2/10]

virtual void Stream::Provider::Deliver ( ConnectRequest req)
pure virtual

connect

Implemented in Stream::SocketPoll.

◆ Deliver() [3/10]

virtual void Stream::Provider::Deliver ( ListenRequest req)
pure virtual

listen

Implemented in Stream::SocketPoll.

◆ Deliver() [4/10]

virtual void Stream::Provider::Deliver ( ConnectAccept req)
pure virtual

accept

Implemented in Stream::SocketPoll.

◆ Deliver() [5/10]

virtual void Stream::Provider::Deliver ( DisconnectRequest req)
pure virtual

disconnect

Implemented in Stream::SocketPoll.

◆ Deliver() [6/10]

virtual void Stream::Provider::Deliver ( DataRequest req)
pure virtual

send data

Implemented in Stream::SocketPoll.

◆ Deliver() [7/10]

virtual void Stream::Provider::Deliver ( ReadRequest req)
pure virtual

Release read buffer.

Implemented in Stream::SocketPoll.

◆ Deliver() [8/10]

virtual void Stream::Provider::Deliver ( StartTLS req)
pure virtual

Start SSL/TLS on stream.

Implemented in Stream::SocketPoll.

◆ Deliver() [9/10]

virtual void Stream::Provider::Deliver ( StreamControl option)
pure virtual

Control stream.

Implemented in Stream::SocketPoll.

◆ Deliver() [10/10]

virtual void Stream::Provider::Deliver ( LengthFnxRequest req)
pure virtual

Set length function.

Implemented in Stream::SocketPoll.

◆ ProviderFactory()

Provider * Stream::Provider::ProviderFactory ( const char *  type,
MSGstruct *  msp 
)
static

Factory method for Stream provider.

Definition at line 153 of file EventSvc.C.

154 {
155 if ( type == NULL )
156 type = DEFAULTSTREAMPROVIDER;
157
158 if ( strcmp (type, "socketpoll") == 0 ) {
159 // If no poll provider, create using the default
162 return 0;
163
164 return CreateSocketPollProvider ();
165 }
166
167 MSG_IOevent_StreamProvidertype_SET (msp, type);
168 return 0;
169 }
static int ProviderFactory(const char *type, MSGstruct *msg)
Factory method.for stream provider.
Definition EventSvc.C:112
static Provider * GetPollService()
Implement as a singleton.

References Poll::Provider::GetPollService(), and Poll::Provider::ProviderFactory().


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

All rights reserved © 2002 - 2024 Isode Ltd.