/* * $Id$ * * L O S A L A M O S * Los Alamos National Laboratory * Los Alamos, New Mexico 87545 * * Copyright, 1986, The Regents of the University of California. * * Author: Jeff Hill */ #include "iocinf.h" tcpSendWatchdog::tcpSendWatchdog (double periodIn, osiTimerQueue & queueIn) : osiTimer (queueIn), period (periodIn) { } tcpSendWatchdog::~tcpSendWatchdog () { } void tcpSendWatchdog::expire () { char hostName[128]; this->hostName ( hostName, sizeof (hostName) ); ca_printf ( "Request not accepted by CA server %s for %g sec. Disconnecting.\n", hostName, this->period); this->forcedShutdown (); } void tcpSendWatchdog::destroy () { // ignore timer destroy requests } bool tcpSendWatchdog::again () const { return false; // a one shot } double tcpSendWatchdog::delay () const { return this->period; } const char *tcpSendWatchdog::name () const { return "TCP Send Watchdog"; } void tcpSendWatchdog::armSendWatchdog () { this->reschedule (); } void tcpSendWatchdog::cancelSendWatchdog () { this->cancel (); }