Add proper EOF handling to Communication & Connection classes:
Add bool member to Communication class indicating whether the
Connection should be closed on receiving an EOF or not. Update the
Connection read to return an EOF status when appropriate. Modify the
Communication class to pass the EOF along or not, and to close the
Connection or not, as appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120723 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBCommunication.cpp b/source/API/SBCommunication.cpp
index ac3042f..6aa1e24 100644
--- a/source/API/SBCommunication.cpp
+++ b/source/API/SBCommunication.cpp
@@ -24,8 +24,8 @@
{
}
-SBCommunication::SBCommunication(const char * broadcaster_name) :
- m_opaque (new Communication (broadcaster_name)),
+SBCommunication::SBCommunication(const char * broadcaster_name, bool close_on_eof) :
+ m_opaque (new Communication (broadcaster_name, close_on_eof)),
m_opaque_owned (true)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));