aboutsummaryrefslogtreecommitdiff
path: root/src/HciSocket.h
diff options
context:
space:
mode:
authorPaul Nettle <nettle.paul@gmail.com>2017-10-02 11:02:09 -0500
committerPaul Nettle <nettle.paul@gmail.com>2017-10-02 11:02:09 -0500
commit6c3a7808db2ba7d3699aaa4c813da4eea810e577 (patch)
tree963654b0a9e910759907a60c538353aa0c0b2959 /src/HciSocket.h
parentAdded a threaded worker that listens for HCI events, resolving a number of pr... (diff)
downloadgobbledegook-6c3a7808db2ba7d3699aaa4c813da4eea810e577.tar.gz
gobbledegook-6c3a7808db2ba7d3699aaa4c813da4eea810e577.tar.bz2
gobbledegook-6c3a7808db2ba7d3699aaa4c813da4eea810e577.zip
Improved threading support, cleaner initialization process and added the ability to wait for threaded responses from HCI commands.
Diffstat (limited to 'src/HciSocket.h')
-rw-r--r--src/HciSocket.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/HciSocket.h b/src/HciSocket.h
index 20dbe4e..b9eebb9 100644
--- a/src/HciSocket.h
+++ b/src/HciSocket.h
@@ -80,12 +80,18 @@ public:
private:
+ // Wait for data to arrive, or for a shutdown event
+ //
+ // Returns true if data is available, false if we are shutting down
+ bool waitForDataOrShutdown() const;
+
// Utilitarian function for logging errors for the given operation
void logErrno(const char *pOperation) const;
int fdSocket;
const size_t kResponseMaxSize = 64 * 1024;
+ const int kDataWaitTimeMS = 10;
};
}; // namespace ggk \ No newline at end of file