-
Notifications
You must be signed in to change notification settings - Fork 15
Refresh Windows C++ client #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c3ceb08
f14480a
3d95b5a
4fcb065
212d76e
1637e8a
fd60136
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # See https://help.github.com/articles/dealing-with-line-endings | ||
|
|
||
| # Set the default behavior, in case people don't have core.autocrlf set. | ||
| text=auto | ||
|
|
||
| # Explicitly declare text files you want to always be normalized and converted | ||
| # to native line endings on checkout. | ||
| *.c text | ||
| *.h text | ||
|
|
||
| # Declare files that will always have CRLF line endings on checkout. | ||
| *.sln text eol=crlf | ||
|
|
||
| # Denote all files that are truly binary and should not be modified. | ||
| *.png binary | ||
| *.jpg binary |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # VoltDB C++ Client for Windows | ||
|
|
||
| For now the VoltDB Windows C++ client is only built as a static library. | ||
|
|
||
| Prerequisites and environment setup | ||
| ========================================= | ||
|
|
||
| - Visual Studio 2013 or better. | ||
|
|
||
| - Boost C++ Library 1.54 or better. Windows build was tested with Boost | ||
| C++ library 1.56 -http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz/download, | ||
| 32 and 64 bit version of it. Following are steps that can be used to build Boost 32 and 64 bit locally | ||
|
|
||
| 32 Bit version: | ||
| Switch to the directory location where boost libraries have been extracted. | ||
| Run following steps to build and install 32 bit version of Boost libraries. | ||
| 1 - bootstrap.bat | ||
| 2 - b2.exe --prefix=c:\Boost --libdir=c:\Boost\lib\i386 install | ||
|
|
||
| 64 Bit version: | ||
| Switch to the directory location where boost libraries have been extracted. | ||
| Run following steps to build and install 64 bit version of Boost libraries. | ||
| 1 - bootstrap.bat | ||
| 2 - b2.exe --prefix=c:\Boost --libdir=c:\Boost\lib\x64 architecture=x86 address-model=64 install | ||
|
|
||
| Create the necessary BOOST environment variables for the VS project: | ||
| - "BOOST_INCLUDE" set to path where the include boost directory that contains all the header files. | ||
| For above installation, set the BOOST_INCLUDE to "C:\Boost\include\boost-1_56". If properly set, | ||
| "echo %BOOST_INCLUDE%" will output "C:\Boost\include\boost-1_56". | ||
|
|
||
| - "BOOST_LIB_32" set to path where the BOOST 32 libraries are located. For above installation, | ||
| set the BOOST_LIB_32 to "C:\Boost\lib\i386". If properly set, "echo %BOOST_LIB_32%" will output | ||
| "C:\Boost\lib\i386" | ||
|
|
||
| - "BOOST_LIB_64" set to path where the BOOST 64 libraries are located. For above installation, | ||
| the BOOST_LIB_64 will be "C:\Boost\lib\x64". If properly set, "echo %BOOST_LIB_64%" will output | ||
| for example "C:\Boost\lib\x64". | ||
|
|
||
|
|
||
| ## Building from the command line | ||
|
|
||
| Use your "favorite" method for creating a command prompt window with the | ||
| necessary environment for running Visual Studio command line tools. Any of | ||
| the following methods will work. | ||
|
|
||
| * Run the Developer Command Prompt from the Start Menu for Visual Studio. | ||
| * Run an ordinary command prompt and invoke VC\vcvarsall.bat from under the VS installation folder. | ||
| * Use some other ad hoc method for permanently setting the user environment. | ||
|
|
||
| ### Using the run.bat script. | ||
|
|
||
| The tools\run.bat script constructs the appropriate command line and can | ||
| provide usage help. Run it with no arguments to see the usage message. | ||
|
|
||
| ``` | ||
| Usage: run build|clean|rebuild debug|release win32|x64 | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,14 +23,15 @@ | |
|
|
||
| #ifndef VOLTDB_CLIENTIMPL_H_ | ||
| #define VOLTDB_CLIENTIMPL_H_ | ||
|
|
||
| #include "PlatformInterface.hpp" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an empty line before this. |
||
| #include <event2/event.h> | ||
| #include <event2/bufferevent.h> | ||
| #include <map> | ||
| #include <set> | ||
| #include <list> | ||
| #include <string> | ||
| #include "ProcedureCallback.hpp" | ||
| //#include "StatusListener.h" | ||
| #include "Client.h" | ||
| #include "Procedure.hpp" | ||
| #include <boost/atomic.hpp> | ||
|
|
@@ -163,6 +164,7 @@ class ClientImpl { | |
| */ | ||
| void createPendingConnection(const std::string &hostname, const unsigned short port, const int64_t time=0); | ||
| void erasePendingConnection(PendingConnection *); | ||
| bool createWakeupNotificationPipe(); | ||
|
|
||
| /* | ||
| * Method for sinking messages. | ||
|
|
@@ -204,7 +206,11 @@ class ClientImpl { | |
| boost::atomic<size_t> m_pendingConnectionSize; | ||
| boost::mutex m_pendingConnectionLock; | ||
|
|
||
| #if defined (_MSC_VER) | ||
| evutil_socket_t m_wakeupPipe[2]; | ||
| #else | ||
| int m_wakeupPipe[2]; | ||
| #endif | ||
| boost::mutex m_wakeupPipeLock; | ||
|
|
||
| ClientLogger* m_pLogger; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,7 @@ class ClientLogger { | |
| * @brief Values that represent logging levels. | ||
| */ | ||
| enum CLIENT_LOG_LEVEL { | ||
| ERROR = 1, | ||
| ERR = 1, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why change ERROR to ERR?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was not letting compile in Windows environment even though it's part of enum. Was complaining about the predefined ERROR in Windows environment, so changed name to ERR instead. |
||
| WARNING = 2, | ||
| INFO = 4, | ||
| DEBUG = 8, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is t.QuadPart assigned is it a union?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a union.