Peter Johnson
a8836b7665
Value: Use variant of enable_if to fix MakeString/MakeRaw in GCC.
...
Tested on GCC 4.8, GCC 4.9, and clang 3.6.
2015-08-22 14:01:33 -07:00
Peter Johnson
96bf5c24b5
Merge pull request #4 from calcmogul/master
...
Replaced time.h with std::chrono
2015-08-20 22:40:59 -07:00
Tyler Veness
ab9de550d9
Replaced time.h with std::chrono
...
This implementation returns the same values as the previous one on both a Linux machine and the roboRIO.
2015-08-20 16:04:55 -07:00
Peter Johnson
9cb9c3beb0
Logger: Move m_min_level init to header.
2015-08-19 22:04:31 -07:00
Peter Johnson
2d1bc2f4c7
Uninline constructors to reduce GetInstance() inlined code size.
2015-08-19 21:49:18 -07:00
Peter Johnson
c6bed1f464
Dispatcher: Move several fixed initial values to header.
2015-08-19 21:16:44 -07:00
Peter Johnson
c41341c7e3
Clean up trailing whitespace.
2015-08-19 20:41:59 -07:00
Peter Johnson
f0e31487f0
raw_istream and kin: a few cleanups.
...
anchor() doesn't seem to change compiler output in current compilers, so
remove it. Use default where appropriate rather than empty bodies.
2015-08-19 20:37:27 -07:00
Peter Johnson
a34143ae75
Update TODO.
2015-08-19 19:18:09 -07:00
Peter Johnson
ca9ce0f3a3
Implement automatic persistent saves.
...
Also loads persistent file on server start.
2015-08-19 19:18:09 -07:00
Peter Johnson
a5ccafd924
Merge pull request #3 from 333fred/gradle-changes
...
Gradle changes
2015-08-18 14:17:53 -07:00
Fredric Silberberg
9458da0454
Added building for arm, x86, and x64 with Gradle. This only builds ntcore currently, I'm working getting Google Test to work.
2015-08-15 21:46:21 -07:00
Peter Johnson
80247e98e5
Use relative include paths in tcpsockets.
2015-08-13 23:07:45 -07:00
Peter Johnson
293d005432
Turn on logging in unit tests.
2015-08-13 22:14:17 -07:00
Peter Johnson
a395e3577f
Notifier: Fix condition variable race.
2015-08-13 21:35:33 -07:00
Peter Johnson
8d7cdeabbf
Implement remote procedure calls.
2015-08-13 21:32:16 -07:00
Peter Johnson
e199e3571b
Revert "Don't error on strict-aliasing warnings."
...
This reverts commit 492463411d .
2015-08-12 17:17:19 -07:00
Peter Johnson
e9618df1b5
Avoid pointer aliasing for double/bits conversions.
...
Instead use the llvm MathExtras.h functions for this, which use union
aliasing.
2015-08-12 17:15:10 -07:00
Peter Johnson
c34ba968f1
Message: Remove ArrayRef-taking ExecuteRpc/RpcResponse.
2015-08-12 17:11:09 -07:00
Peter Johnson
0cbcfbc3f0
Import llvm::DenseMap.
...
Bring in (most of) MathExtras.h as well, as it's shared by SmallVector and
DenseMap.
2015-08-12 17:08:45 -07:00
Peter Johnson
492463411d
Don't error on strict-aliasing warnings.
...
These warnings occur in release mode for the double-to-uint64 cast used
for transmitting double values.
2015-08-04 20:38:31 -07:00
Peter Johnson
cd53feb193
Log DEBUG() macros: avoid spurious warnings in release builds.
2015-08-04 20:36:39 -07:00
Peter Johnson
00feb67064
Only use enable_if template on Windows.
...
This isn't required and doesn't compile on older GCC versions.
2015-08-04 19:59:45 -07:00
Peter Johnson
b3eed38187
Get build working on Windows (MSVC 2013).
...
Windows needs static libraries to build the tests as gtest/gmock are built statically.
2015-08-04 01:29:06 -07:00
Peter Johnson
f683a5c63c
Export C API functions on Win32.
2015-08-04 00:15:00 -07:00
Peter Johnson
7d409f071e
Add win32 tcpsockets implementation.
2015-08-04 00:01:13 -07:00
Peter Johnson
4146db6fc8
Visual Studio 2013 compilation fixes.
...
- Missing header file callouts in some cases (library deltas)
- Lack of support for auto parameters in lambdas
- Defining of ERROR by windows.h
- Dispatcher::Connection needs a move constructor (default not generated)
- Need explicit enable_if on std::string move template in Value to avoid trying to move const char[] (string literal)
- Compile flags
2015-08-03 01:27:02 -07:00
Peter Johnson
a86f65db1e
Dispatcher: Implement transmit combining.
...
This handles most of the major cases, but not a loop of delete/assign, which
should be uncommon anyway.
2015-08-02 23:21:23 -07:00
Peter Johnson
53a0531def
Storage::ProcessIncoming(): Don't override parameter with local.
2015-08-02 23:20:42 -07:00
Peter Johnson
7db00575c9
NetworkConnection: Add a bit more debugging.
2015-08-02 22:23:14 -07:00
Peter Johnson
5b65bfb64d
Storage: Fix comparison for client update-on-assign.
2015-08-02 22:18:46 -07:00
Peter Johnson
3b0eb56cf6
Update TODO.
2015-08-02 21:47:56 -07:00
Peter Johnson
e9073a3cc0
Implement notifiers.
...
The notifier thread is lazily started when the first notifier is added.
This avoids the extra thread/processing overhead when notifiers are not used.
2015-08-02 21:47:01 -07:00
Peter Johnson
538a19fd47
Implement GetConnections().
2015-08-02 10:47:05 -07:00
Peter Johnson
84ff80710c
Refactor TCP-specific pieces of Dispatcher.
2015-08-02 00:33:41 -07:00
Peter Johnson
0dcaf56ed1
Add NetworkAcceptor and NetworkStream interfaces.
...
These allow mocking of TCPAcceptor and TCPStream respectively.
2015-08-02 00:06:27 -07:00
Peter Johnson
6703968f73
Dispatcher: Fix shutdown order race.
...
We need to wait until after the dispatch and client/server threads have
been stopped before closing connections, as these threads can add connections.
2015-08-01 23:37:13 -07:00
Peter Johnson
8ec65dbfc8
Use unique_ptr instead of shared_ptr for m_server_acceptor.
2015-08-01 20:29:16 -07:00
Peter Johnson
4670ef6ec5
Refactor StorageTest base class.
2015-08-01 16:33:52 -07:00
Peter Johnson
35e6400174
Storage: Add vector include.
2015-08-01 16:33:39 -07:00
Peter Johnson
67de7af7b2
Storage: Use unique_ptr instead of shared_ptr for Entry.
2015-08-01 11:47:35 -07:00
Peter Johnson
3b207ad2c3
StorageTest: Fix string comparison for Warn().
...
Previously this was comparing pointers rather than the string contents.
2015-08-01 11:45:41 -07:00
Peter Johnson
b5274a495e
Dispatcher: Don't call Storage::GetInstance() internally.
...
This makes it difficult to test. Instead, store reference as member variable,
and populate it at constuction (with an alternate constructor available for
test purposes).
2015-08-01 11:15:04 -07:00
Peter Johnson
11508b77d1
Ensure initial synchronization is atomic.
2015-07-31 23:56:06 -07:00
Peter Johnson
0a10778697
NetworkConnection: Kill write thread when read dies and vice-versa.
2015-07-31 23:40:16 -07:00
Peter Johnson
ecbf76e94b
Update tcpsockets classes to use log framework.
2015-07-31 23:34:54 -07:00
Peter Johnson
6c0103639c
Make LOG() usable from other namespaces.
2015-07-31 23:33:41 -07:00
Peter Johnson
c2eb4a766e
Dispatcher: Provide some INFO-level connection messages.
2015-07-31 23:26:38 -07:00
Peter Johnson
06e8d835dd
Provide ostream output for StringRef.
2015-07-31 23:20:59 -07:00
Peter Johnson
3a71acec52
Automatically reconnect client.
...
Also clean up some condition variable handling to make it more robust.
2015-07-31 23:14:26 -07:00