Ignore:
Timestamp:
Nov 3, 2016, 10:57:57 PM (8 years ago)
Author:
ldelgass
Message:

Add optional idle timeout to vtkvis server. Allows server to close connection
and exit after a specified period without commands from the client.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vtkvis/trunk/Renderer.cpp

    r6554 r6568  
    7676    _needsCameraClippingRangeReset(false),
    7777    _needsCameraReset(false),
     78    _idleTimeout(-1L),
    7879    _windowWidth(500),
    7980    _windowHeight(500),
     
    46464647
    46474648/**
     4649 * \brief Get a timeout for select()
     4650 *
     4651 * For now, this just returns the idle timeout, if set.
     4652 *
     4653 * Potentially, this could be used to set a timeout based on the "unused" frame
     4654 * time from the previous render based on a target frame rate (and polling if
     4655 * we broke frame).
     4656 */
     4657void Renderer::getTimeout(struct timeval *tv)
     4658{
     4659    tv->tv_sec = _idleTimeout;
     4660    tv->tv_usec = 0L;
     4661}
     4662
     4663/**
    46484664 * \brief Cause the rendering to render a new image if needed
    46494665 *
Note: See TracChangeset for help on using the changeset viewer.