mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
provision for non-blocking comms
This commit is contained in:
@ -78,7 +78,15 @@ inline void Foam::IPstream::readFromBuffer
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IPstream::~IPstream()
|
||||
{}
|
||||
{
|
||||
if (bufPosition_ < messageSize_)
|
||||
{
|
||||
FatalErrorIn("IPstream::~IPstream()")
|
||||
<< "Message not fully consumed. messageSize:" << messageSize_
|
||||
<< " bytes of which only " << bufPosition_
|
||||
<< " consumed." << Foam::abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -350,6 +350,31 @@ public:
|
||||
return oldCommsType;
|
||||
}
|
||||
|
||||
//- Transfer buffer
|
||||
const List<char>& buf() const
|
||||
{
|
||||
return buf_;
|
||||
}
|
||||
|
||||
//- Transfer buffer
|
||||
List<char>& buf()
|
||||
{
|
||||
return buf_;
|
||||
}
|
||||
|
||||
//- Current buffer read/write location
|
||||
int bufPosition() const
|
||||
{
|
||||
return bufPosition_;
|
||||
}
|
||||
|
||||
//- Current buffer read/write location
|
||||
int& bufPosition()
|
||||
{
|
||||
return bufPosition_;
|
||||
}
|
||||
|
||||
|
||||
//- Exit program
|
||||
static void exit(int errnum = 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user