Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/downloader/identityStream.cxx

Go to the documentation of this file.
00001 // Filename: identityStream.cxx
00002 // Created by:  drose (09Oct02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include "identityStream.h"
00020 
00021 // This module is not compiled if OpenSSL is not available.
00022 #ifdef HAVE_SSL
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //     Function: IIdentityStream::is_closed
00026 //       Access: Public, Virtual
00027 //  Description: Returns true if the last eof condition was triggered
00028 //               because the socket has genuinely closed, or false if
00029 //               we can expect more data to come along shortly.
00030 ////////////////////////////////////////////////////////////////////
00031 bool IIdentityStream::
00032 is_closed() {
00033   if ((_buf._has_content_length && _buf._bytes_remaining == 0) || 
00034       (*_buf._source)->is_closed()) {
00035     return true;
00036   }
00037   clear();
00038   return false;
00039 }
00040 
00041 #endif  // HAVE_SSL

Generated on Fri May 2 00:36:50 2003 for Panda by doxygen1.3