Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PIndirectChannel::IsOpen (  )  const [virtual, inherited]

Determine if the channel is currently open and read and write operations can be executed on it. For example, in the PFile# class it returns if the file is currently open.

Returns:
TRUE if the channel is open.

Reimplemented from PChannel.

Definition at line 797 of file pchannel.cxx.

Referenced by PPOP3Client::Close(), PSMTPClient::Close(), and PFTPClient::Close().

{
  PReadWaitAndSignal mutex(channelPointerMutex);

  if (readChannel != NULL && readChannel == writeChannel)
    return readChannel->IsOpen();

  BOOL returnValue = readChannel != NULL ? readChannel->IsOpen() : FALSE;

  if (writeChannel != NULL)
    returnValue = writeChannel->IsOpen() || returnValue;

  return returnValue;
}


Generated by  Doxygen 1.6.0   Back to index