Граф коммитов

111 Коммитов

Автор SHA1 Сообщение Дата
Xiaohongt a2aa1fee4e change the testhost port 2015-03-20 13:12:10 -07:00
Xiaohongt 20b8d7de6b Integrate e2e tests with MSBuild 2015-03-20 10:57:22 -07:00
Xiaohongt d1be9c04f9 add c++ e2e tests 2015-03-19 20:38:51 -07:00
moozzyk 7bcf93ad4a TwinkleTwinkleLittleStar - dereferencing before banging
Fixing a bug where we did not dereference pointer before checking the value which resulted in the condition being always true.
2015-03-17 15:29:39 -07:00
moozzyk 701f39fabf Diag - more logging. Making tests more resilient to threading issues. 2015-03-17 13:21:02 -07:00
moozzyk d1f9763947 RaceyReconnects - fixing races when reconnecting
Previously to prevent the user from deadlocking themselves in case the called `connection.stop()` from the `reconnecting` event we would first start the reconnecting process and then called the `reconnecting` event. This was racey since it was (very unlikely but still) possible that reconnect would finish quickly and would invoke `reconnected` callback before the `reconnecting` callback was invoked (happens once in a blue moon on a @BrennanConroy 's box). Another issue was that if the user called `connection.stop()` and `connection.start()` in the event the connection could be dropped so we would start a new reconnect attempt and as a result we would have 2 reconnecting attempts running in parallel but using the same disconnect cts and start event. The fix is to invoke the `reconnecting` event before starting the reconnecting process. We also copy the current disconnect cts which makes it possible to check if the connection was restarted in the `reconnecting` callback and if it was we are canceling this reconnect. This makes it impossible to have multiple concurrent reconnects.
2015-03-17 13:21:00 -07:00
moozzyk 0d512c2b83 BackFromTheFuture - fixing code so that it compiles in both VS2013 and VS2015 2015-03-16 13:38:56 -07:00
moozzyk 7af4317610 BetterUrls - using test name as a url to make debugging outstanding threads easier 2015-03-05 14:03:30 -08:00
moozzyk 82503e1b09 InADisconnectedStae - fixing typos 2015-03-05 13:51:31 -08:00
moozzyk e86de2c6a8 TODO:ResolveAllTODOs - addressing TODOs in the code 2015-03-05 13:44:42 -08:00
moozzyk 7999704f62 Fixing a race in a test 2015-03-05 13:12:23 -08:00
moozzyk ffe845af9f Adding logging to help figure out CI failure 2015-03-04 21:57:49 -08:00
moozzyk bc71c05d73 TooSensitive - making comparison of hub and hub function names case insensitive 2015-03-04 21:03:44 -08:00
moozzyk 6ae3f6b52a JustLetMeKnow - enabling setting callbacks for events in the public API 2015-03-04 19:43:04 -08:00
moozzyk 3752749b31 HardCall - finishing pending hub invocations when connection is dropped
Bonus: adding a handler to be called when the connection is stopped
2015-03-04 19:36:29 -08:00
moozzyk 996509ad5a RaceToDeath - fixing a race between reconnect and stop
We were signalling the `m_start_completed_event` after the connection reconnected but before we changed the connection state to `connected`. If there was an ongoing call to the `stop()` function the thread would get unblocked and could change the connection state to `disconnecting` before the thread doing the reconnect would have a chance to change the connection state to `connected`. This caused an assert because we assume that if reconnecting succeeded we should go from the `reconnecting` to the `connected` state. The fix is to signal the event after we changed the state. It is also correct because the connection has reconnected succesfully so the state it should be is the `connected` state.
2015-03-04 16:12:39 -08:00
moozzyk e41a8ff682 Reconnect - "re-establish a bond of communication or emotion"
Adding support for reconnecting to the server if the connection is lost.
2015-03-04 12:06:09 -08:00
moozzyk ea08958be7 DisconnectTimeout - adding connection disconnect timeout 2015-02-16 15:54:14 -08:00
moozzyk 16da26f824 Ooops - fixing a test that started failing after the version has changed 2015-02-16 11:17:07 -08:00
moozzyk c07a2d85df 0.0.0 - support versioning in build 2015-02-16 10:38:37 -08:00
moozzyk 30e942cf5f SignalR - appending "/SignalR" to the hub_connection url by default 2015-02-13 13:54:23 -08:00
moozzyk 8071bf603f Groupies - saving message id and groups token
This is needed for reconnects
2015-02-13 10:51:01 -08:00
moozzyk 10b1b2c2f1 Re:Connect - enabling building reconnect uri 2015-02-13 10:49:05 -08:00
moozzyk 056f11c8a3 Demoted - removing `trace_log_writer` from public API
`trace_log_writer` is the default log writer which (for windows) is using `OutputDebugString` to log the client activity. It was only public because it was used as the default parameter value for `log_writer` in the ctors of the `connection` and `hub_connection` classes. This class was not really meant to be used externally (and after one of the previous changes it could not even be used externally because the `write` method was not exported from the dll) so I am moving it from the public includes folder into the implementation folder.
2015-02-11 20:29:10 -08:00
moozzyk a11ec687f2 ConfigurationOverConvention - specifying calling convention explicitly
on public API
2015-02-10 15:37:56 -08:00
moozzyk 3646668f81 FollowUp
- fixing paths to includes (how did it even compile before, especially on the CI?)
- `websockets` namespace was pulled out from the `experimental` namespace and renamed from `web_sockets`
2015-02-09 12:52:35 -08:00
Pawel Kadluczka 3aecd858de SpeedyCrossPlatformer - fixing stdafx.
- #ifdefing Windows specific stuff in stdafx.h
- Adding common 3rd party headers to stdafx.h to precompile them - makes build 25% faster
- Removing targetver.h - it was merged with stdafx.h
2015-02-05 19:03:07 -08:00
BrennanConroy 5ba6d7a403 Destruction is imminent 2015-01-30 13:44:09 -08:00
moozzyk 5fadf74e81 MyWayOrNoWay
Ensuring that the connection is in the disconnected state when the user wants to set headers and/or connection data
2015-01-29 16:08:39 -08:00
moozzyk cb079c665b YourNewIdentityIs... - renaming NuGet package to Microsoft.AspNet.SignalR.Client.Cpp 2015-01-29 15:58:45 -08:00
moozzyk 8e58e72733 Enforcer - enforcing restoring packages to avoid CI failures 2015-01-29 13:06:20 -08:00
moozzyk b3936c805c LatestAndGreatest - moving to casablanca 2.4.0.1
Reasons:
- secure websockets apparently did not work correctly in 2.2.0
- 2.4.0.1 has v140 compatible binaries we will need

Other changes:
- using headers installed with NuGet package and not with VS
- enforcing using the `std::min` function istead of the `min` macro defined only in a windows header file
2015-01-29 12:19:51 -08:00
moozzyk dfd2b56ab9 Lost&Found - creating the package in the artifacts folder 2015-01-28 13:23:51 -08:00
moozzyk 646e1dc27e Run/Stop-Restore - enforcing package restore before creating client package
If we don't restore pacakges before compiling the dll it will fail to link.
2015-01-28 12:54:06 -08:00
moozzyk 8db6695022 HeadersForEveryone - adding support for headers to websocket transport 2015-01-26 22:12:35 -08:00
moozzyk 7816b6225d <header> - adding support for custom headers 2015-01-26 22:12:30 -08:00
moozzyk 32c3f0c8d6 NotJson - logging test results to an Xml file for teamcity. 2015-01-26 20:45:42 -08:00
Pawel Kadluczka 8e49daae24 TouchUps - tweaking API
- adding a public parameterless ctor to the `hub_proxy` class
- blocking passing `hub_connection` and `connection` instances by value to prevent from creating cycles where a `hub_connection` or `connection` instance is captured by value in a callback stored in the very same `hub_connection` or `connection` instance
2015-01-20 11:53:26 -08:00
moozzyk f05511b01f OutOfTheBoxExperience - making the signalr NuGet package work seamlessly
Creating a targets file that will:
- Add the signalrclient include directory to %AdditionalIncludes%
- Add a correct version of signalrclient.lib to %AdditionalDependencies%
- Copy a correct version of signalrclient.dll to the project target directory after the project is built

The .targets file is added to the project by NuGet when installing the package
2015-01-20 11:43:50 -08:00
moozzyk 54794b103a MyPreciousMyNugget - creating SignalRClient NuGet package (part 1)
Remaining tasks
  * add .props/.targets files so that the user does not have to add AdditionalIncludes/AdditionalDependencies manually
  * review nuspec contents (links, licenses, etc.)
2015-01-16 12:44:33 -08:00
moozzyk 1007cde694 HubschAPI - adding public surface for hubs 2015-01-16 10:29:33 -08:00
moozzyk ad349b64b0 RecognizedByParents - adding back pointer to the connection in hub proxy 2015-01-15 14:44:39 -08:00
moozzyk cff9bd7f63 MakingGoodProgress - adding support for progress messages 2015-01-14 15:51:42 -08:00
moozzyk db281825ae ExceptionalHubs - adding support for `hub_exception`
Bonus: making sure that the json response is not modified during processing
2015-01-13 15:05:57 -08:00
moozzyk ec2c58dee0 HubAndNoSpokes - adding internals for supporting hub method invocations 2015-01-12 16:40:03 -08:00
moozzyk 1b571a4b20 itoa - changing callback id from int to string
Signalr uses strings for callback ids in the protocol so changing callback manager to also use strings.
Adding a method to remove callbacks.
2015-01-12 09:09:37 -08:00
moozzyk 47e6b63c38 MayISpeakWithYourManager - introducing callback_manager
Introducing callback_manager which keeps track of callbacks for incomplete invocations.
2015-01-12 09:04:57 -08:00
moozzyk e236ac79c8 BuildBuild\build.msbuild
Adding the build.msbuild file to enable building and running tests from command line (now) and building the NuGet package (soon).
Renaming signalrclient.build.settings -> SignalRClient.Build.Settings to follow MSBuild conventions.
2015-01-08 21:55:51 -08:00
moozzyk dc65b8c0ae StutteringParser - avoiding duplicate response parsing when using hubs
`connection_impl` allowed registering a callback when a message was received. This callback used to take a string as the parameter. However for hubs the message is in json format so we had to parse the parameter. Since SignalR uses json to communicate and the response was already parsed it is more efficient to pass the json object we already had instead of serializing it and re-parsing. To fix this we add an "overload" that allows registering a callback that takes `json::value` as the parameter. The way we do it is a bit clumsy (that's why this is "overload" and overload) since there isn't a straightforward way of adding and overload taking `std::function` with different parameters. Since the `connection_impl` is an internal class this should be fine - the public API does not reflect this in any way.
The change also fixes a corner case where a hub connection would receive a persistent connection message - before we would fail when parsing a primitive value, now we can handle this case gracefully.
2015-01-08 21:35:52 -08:00
moozzyk 5a2cd79cbb TheyDidCallMeBack - adding support for hub invocations
Bonus:
- fixing a bug from a previous pull request where `connectionToken` and `connectionData` parameters were swapped
- adding a test that tests that the connection gets closed when `hub_connection_impl` goes out of scope
2015-01-08 21:26:45 -08:00