Files
epics-base/src/cas/generic/st/casIntfOS.cc
Jeff Hill 36b70e243f fixed problem where send was not always rearmed if this
was indirectly necessary in the send callback because
in this callback the code considered sends to be still armed
until the send callback completed
1998-10-23 00:27:15 +00:00

93 lines
1.2 KiB
C++
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
*
* casIntfOS.cc
* $Id$
*
*
*/
//
// CA server
//
#include "server.h"
//
// casServerReg
//
class casServerReg : public fdReg {
public:
casServerReg (casIntfOS &osIn) :
fdReg (osIn.getFD(), fdrRead), os (osIn) {}
~casServerReg ();
private:
casIntfOS &os;
void callBack ();
};
//
// casIntfOS::init()
//
caStatus casIntfOS::init(const caNetAddr &addrIn, casDGClient &dgClientIn,
int autoBeaconAddr, int addConfigBeaconAddr)
{
caStatus stat;
stat = this->casIntfIO::init(addrIn, dgClientIn,
autoBeaconAddr, addConfigBeaconAddr);
if (stat) {
return stat;
}
this->setNonBlocking();
if (this->pRdReg==NULL) {
this->pRdReg = new casServerReg(*this);
if (this->pRdReg==NULL) {
return S_cas_noMemory;
}
}
return S_cas_success;
}
//
// casIntfOS::~casIntfOS()
//
casIntfOS::~casIntfOS()
{
if (this->pRdReg) {
delete this->pRdReg;
}
}
//
// casIntfOS::newDGIntfIO()
//
casDGIntfIO *casIntfOS::newDGIntfIO(casDGClient &dgClientIn) const
{
return new casDGIntfOS(dgClientIn);
}
//
// casServerReg::callBack()
//
void casServerReg::callBack()
{
assert(this->os.pRdReg);
this->os.cas.connectCB(this->os);
}
//
// casServerReg::~casServerReg()
//
casServerReg::~casServerReg()
{
}