00001 // Filename: bioStream.cxx 00002 // Created by: drose (25Sep02) 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 "bioStream.h" 00020 00021 00022 #ifdef HAVE_SSL 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Function: IBioStream::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 IBioStream:: 00032 is_closed() { 00033 if (_buf._is_closed) { 00034 return true; 00035 } 00036 clear(); 00037 return false; 00038 } 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // Function: OBioStream::is_closed 00042 // Access: Public, Virtual 00043 // Description: Returns true if the last write fail condition was 00044 // triggered because the socket has genuinely closed, or 00045 // false if we can expect to send more data along 00046 // shortly. 00047 //////////////////////////////////////////////////////////////////// 00048 bool OBioStream:: 00049 is_closed() { 00050 if (_buf._is_closed) { 00051 return true; 00052 } 00053 clear(); 00054 return false; 00055 } 00056 00057 //////////////////////////////////////////////////////////////////// 00058 // Function: BioStream::is_closed 00059 // Access: Public, Virtual 00060 // Description: Returns true if the last eof or failure condition was 00061 // triggered because the socket has genuinely closed, or 00062 // false if we can expect to read or send more data 00063 // shortly. 00064 //////////////////////////////////////////////////////////////////// 00065 bool BioStream:: 00066 is_closed() { 00067 if (_buf._is_closed) { 00068 return true; 00069 } 00070 clear(); 00071 return false; 00072 } 00073 00074 #endif // HAVE_SSL