#include <UdsOp.h>

Inheritance diagram for Ipc::UdsOp:
Collaboration diagram for Ipc::UdsOp:

Public Types

typedef CbcPointer< AsyncJobPointer
 

Public Member Functions

 UdsOp (const String &pathAddr)
 
virtual ~UdsOp ()
 
bool canBeCalled (AsyncCall &call) const
 whether we can be called More...
 
void callStart (AsyncCall &call)
 
virtual void callEnd ()
 called right after the called job method More...
 
virtual void callException (const std::exception &e)
 called when the job throws during an async call More...
 
virtual void * toCbdata ()=0
 

Static Public Member Functions

static Pointer Start (AsyncJob *job)
 starts a freshly created job (i.e., makes the job asynchronous) More...
 

Public Attributes

struct sockaddr_un address
 UDS address from path; treat as read-only. More...
 

Protected Member Functions

virtual void timedout ()
 called after setTimeout() if timed out More...
 
Comm::ConnectionPointerconn ()
 creates if needed and returns raw UDS socket descriptor More...
 
void setTimeout (int seconds, const char *handlerName)
 call timedout() if no UDS messages in a given number of seconds More...
 
void clearTimeout ()
 remove previously set timeout, if any More...
 
void setOptions (int newOptions)
 changes socket options More...
 
void deleteThis (const char *aReason)
 
void mustStop (const char *aReason)
 
bool done () const
 the job is destroyed in callEnd() when done() More...
 
virtual void start ()
 called by AsyncStart; do not call directly More...
 
virtual bool doneAll () const
 whether positive goal has been reached More...
 
virtual void swanSong ()
 
virtual const char * status () const
 internal cleanup; do not call directly More...
 

Protected Attributes

const char * stopReason
 reason for forcing done() to be true More...
 
const char * typeName
 kid (leaf) class name, for debugging More...
 
AsyncCall::Pointer inCall
 the asynchronous call being handled, if any More...
 
const InstanceId< AsyncJobid
 job identifier More...
 

Private Member Functions

void noteTimeout (const CommTimeoutCbParams &p)
 Comm timeout callback; calls timedout() More...
 
 UdsOp (const UdsOp &)
 
UdsOpoperator= (const UdsOp &)
 

Private Attributes

int options
 UDS options. More...
 
Comm::ConnectionPointer conn_
 UDS descriptor. More...
 

Detailed Description

code shared by unix-domain socket senders (e.g., UdsSender or Coordinator) and receivers (e.g. Port or Coordinator)

Definition at line 29 of file UdsOp.h.

Member Typedef Documentation

◆ Pointer

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

◆ UdsOp() [1/2]

Ipc::UdsOp::UdsOp ( const String pathAddr)

Definition at line 19 of file UdsOp.cc.

References debugs, and HERE().

◆ ~UdsOp()

Ipc::UdsOp::~UdsOp ( )
virtual

Definition at line 27 of file UdsOp.cc.

References Comm::Connection::close(), conn_, debugs, HERE(), Comm::IsConnOpen(), and NULL.

◆ UdsOp() [2/2]

Ipc::UdsOp::UdsOp ( const UdsOp )
private

Member Function Documentation

◆ callEnd()

void AsyncJob::callEnd ( )
virtualinherited

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)
inherited

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 101 of file AsyncJob.cc.

References AsyncCall::cancel(), debugs, HERE(), AsyncJob::inCall, and NULL.

Referenced by AsyncJob::swanSong().

◆ clearTimeout()

void Ipc::UdsOp::clearTimeout ( )
protected

Definition at line 62 of file UdsOp.cc.

References commUnsetConnTimeout(), and conn().

Referenced by Ipc::Strand::handleRegistrationResponse(), and timedout().

◆ conn()

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)
protectedinherited

◆ done()

◆ doneAll()

◆ mustStop()

void AsyncJob::mustStop ( const char *  aReason)
protectedinherited

Definition at line 69 of file AsyncJob.cc.

References debugs, AsyncJob::inCall, Must, NULL, AsyncJob::stopReason, and AsyncJob::typeName.

Referenced by HttpStateData::abortAll(), Ftp::Client::abortAll(), Comm::TcpAcceptor::acceptOne(), Adaptation::Ecap::XactionRep::adaptationAborted(), Adaptation::AccessCheck::callBack(), AsyncJob::callException(), Security::PeerConnector::connectionClosed(), HttpStateData::continueAfterParsingHeader(), Ftp::Client::ctrlClosed(), Adaptation::Iterator::handleAdaptationBlock(), Adaptation::Iterator::handleAdaptationError(), Log::TcpLogger::handleClosure(), Adaptation::Icap::Xaction::handleCommClosed(), Http::Tunneler::handleConnectionClosure(), Mgr::Forwarder::handleError(), Ipc::Forwarder::handleError(), Ipc::Forwarder::handleException(), Ipc::Inquirer::handleException(), HttpStateData::handleMoreRequestBodyAvailable(), Ipc::Inquirer::handleRemoteAck(), Ipc::Forwarder::handleTimeout(), HttpStateData::httpStateConnClosed(), HttpStateData::httpTimeout(), Comm::ConnOpener::noteAbort(), Adaptation::Icap::ModXact::noteBodyConsumerAborted(), Snmp::Forwarder::noteCommClosed(), Snmp::Inquirer::noteCommClosed(), Mgr::Inquirer::noteCommClosed(), Mgr::Forwarder::noteCommClosed(), Mgr::StoreToCommWriter::noteCommClosed(), Adaptation::Icap::Xaction::noteCommRead(), Rock::HeaderUpdater::noteDoneReading(), Adaptation::Iterator::noteInitiatorAborted(), Adaptation::Icap::Xaction::noteInitiatorAborted(), Adaptation::Ecap::XactionRep::noteInitiatorAborted(), HttpStateData::readReply(), Comm::ConnOpener::sendAnswer(), Rock::Rebuild::start(), Security::PeerConnector::start(), HttpStateData::start(), Ipc::UdsSender::timedout(), and HttpStateData::wroteLast().

◆ noteTimeout()

void Ipc::UdsOp::noteTimeout ( const CommTimeoutCbParams p)
private

Definition at line 67 of file UdsOp.cc.

References timedout().

Referenced by setTimeout(), and timedout().

◆ operator=()

UdsOp& Ipc::UdsOp::operator= ( const UdsOp )
private

◆ setOptions()

void Ipc::UdsOp::setOptions ( int  newOptions)
protected

Definition at line 35 of file UdsOp.cc.

References options.

Referenced by Ipc::Port::Port(), and timedout().

◆ setTimeout()

void Ipc::UdsOp::setTimeout ( int  seconds,
const char *  handlerName 
)
protected

◆ Start()

◆ start()

◆ status()

◆ swanSong()

◆ timedout()

virtual void Ipc::UdsOp::timedout ( )
inlineprotectedvirtual

Reimplemented in Ipc::UdsSender, and Ipc::Strand.

Definition at line 39 of file UdsOp.h.

References clearTimeout(), conn(), noteTimeout(), p, setOptions(), and setTimeout().

Referenced by noteTimeout().

◆ toCbdata()

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited

Member Data Documentation

◆ address

struct sockaddr_un Ipc::UdsOp::address

Definition at line 36 of file UdsOp.h.

Referenced by conn(), and Ipc::UdsSender::UdsSender().

◆ conn_

Comm::ConnectionPointer Ipc::UdsOp::conn_
private

Definition at line 55 of file UdsOp.h.

Referenced by conn(), and ~UdsOp().

◆ id

const InstanceId<AsyncJob> AsyncJob::id
protectedinherited

Definition at line 72 of file AsyncJob.h.

◆ inCall

◆ options

int Ipc::UdsOp::options
private

Definition at line 54 of file UdsOp.h.

Referenced by conn(), and setOptions().

◆ stopReason

const char* AsyncJob::stopReason
protectedinherited

◆ typeName


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors