From 67eb929b63deef1627b1ae54aad31ddfc6c083ae Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 5 Aug 1996 19:26:15 +0000 Subject: [PATCH] made os specific code smaller --- src/cas/generic/casDGClient.cc | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/src/cas/generic/casDGClient.cc b/src/cas/generic/casDGClient.cc index bea810402..becd0169c 100644 --- a/src/cas/generic/casDGClient.cc +++ b/src/cas/generic/casDGClient.cc @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.2 1996/06/26 21:18:52 jhill + * now matches gdd api revisions + * * Revision 1.1.1.1 1996/06/20 00:28:15 jhill * ca server installation * @@ -290,3 +293,56 @@ void casDGClient::ioBlockedSignal() // } +// +// casDGClient::process() +// +void casDGClient::process() +{ + caStatus status; + casFlushCondition flushCond; + casFillCondition fillCond; + + // + // force all replies to be sent to the client + // that made the request + // + this->clear(); + + // + // read in new input + // + fillCond = this->fill(); + if (fillCond == casFillDisconnect) { + casVerify(0); + return; + } + // + // verify that we have a message to process + // + if (this->inBuf::bytesPresent()>0u) { + // + // process the message + // + status = this->processMsg(); + if (status) { + errMessage (status, + "unexpected error processing stateless protocol"); + // + // clear the input buffer so this will + // not effect future input + // + this->clear(); + } + else { + // + // force all replies to go to the sender + // + flushCond = this->flush(); + if (flushCond!=casFlushCompleted) { + this->clear(); + casVerify(0); + } + } + } +} +