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

116 Коммитов

Автор SHA1 Сообщение Дата
moozzyk d07b870147 Bumping version to beta2 2017-04-06 12:11:16 -07:00
Eilon Lipton 5053a74e1e Update RawConnection.cs 2017-02-27 12:27:26 -08:00
Pawel Kadluczka 43026de5ba Enablng creating UWP NuGet package 2017-01-30 15:40:27 -08:00
Pawel Kadluczka 2021090834 Minor fixes to enabling http/websocket client configuration 2017-01-21 12:49:20 -08:00
Albert 3bc6b067c8 123 Allow to specify web proxy
- Added class signalr_client_config which holds http_client_config and websocket_client_config
- Removed (hub_)connection::set_headers and replaced it with set_client_config
2017-01-21 12:48:06 -08:00
moozzyk 2410a499fb Fixing serializing string twice in persistent connection
Since SignalR payloads are Json we parse the incoming message as a Json object and extract the actual message. For persistent connections the api is a string based so we need to turn the message back to string. We used to always serialize it but if the value is already a string it causes double escaping. The fix is to check if the value is a string and if it is just pass it down to the receive handler, otherwise (e.g. it is a json object or a number etc.) we serialize it back to string as we did before.

Issue: #128
2016-12-13 16:25:57 -08:00
moozzyk cb91fe8991 Updating cpprestsdk to 2.9.1 2016-12-12 17:03:04 -08:00
moozzyk 530d0713ba Introducing signalr_exception 2016-12-12 09:49:39 -08:00
Pawel Kadluczka 5508d91919 Exposing connection id and connection token 2016-12-12 09:42:51 -08:00
Pawel Kadluczka cbbf8f7c7b Adding status code to web_exception 2016-12-09 08:54:17 -08:00
moozzyk 4711271beb Updating version to beta1 2016-01-20 14:21:18 -08:00
Pawel Kadluczka 5c86e0c4a4 Casablanca270
Moving to Casablanca 2.7.0
2015-12-14 17:20:43 -08:00
Pawel Kadluczka 5dfa11e08f Enabling building and running tests on Linux 2015-12-12 17:48:18 -08:00
Pawel Kadluczka 1ad436914a _TCHAR - removing <tchar.h> and references to TCHAR 2015-08-05 20:32:33 -07:00
moozzyk 0715d7ae76 HomebrewEvent - replacing pplx::event with a cross platform counterpart 2015-08-03 22:58:41 -07:00
moozzyk b1099982fa FixerUpper - enabling building with VS2015s 2015-06-20 19:28:28 -07:00
moozzyk 8aa53dbcd0 NewerGreaterBigger - moving to full cpprestsdk 2.6.0 package 2015-06-20 12:31:12 -07:00
N. Taylor Mullen 334b77b0f6 Update LICENSE.txt and license header on files. 2015-05-01 14:00:57 -07:00
moozzyk 715d4d22e5 Merge branch 'release' into dev 2015-04-16 16:35:13 -07:00
moozzyk 5bc613d1aa Vulcan - changing compile and link settings 2015-04-16 15:26:00 -07:00
Pawel Kadluczka f77aeb17bf SlashForwarding - replacing `\` with `/` in #includes 2015-04-10 22:13:04 -07:00
Pawel Kadluczka 663ed093d0 GettingAheadOfOneself - fixing flaky tests
There was a race between sending the last progress message and returning from the hub method and the server does not serve the progress message if the method has already completed. Sleeping after reporting progress "fixes" the race.
2015-04-10 15:03:52 -07:00
moozzyk d101afcf6f SimpleSample - adding samples showing persistent connection and hubs usage 2015-03-30 20:42:36 -07:00
moozzyk ff8922cd5d WrongVersion - throwing if client and server protocol versions don't match 2015-03-25 21:29:33 -07:00
moozzyk 146bd8219c ExceptionToTheRule - incorrect exception thrown if `stop()` called before init message recieved and /connect timeouts
If the user called `stop()` before the init message (the response to the /connect request) was received and the init message was not received within the `TransportConnectTimeout` we would have thrown an exception saying "transport timed out when trying to connect". This is unexpected since the user had already called `.stop()` on the connection. The issue was that in the thread that was terminating the `start()` request in case of connect timeout we did not check if the connection hadn't been stopped. After the change, if the connection had been stopped we just complete the `connect_request_tce` and let the continuation to take care of the rest (which results in throwing pplx::task_canceled exception since the `start()` was cancelled by invoking the `stop()` function).

Bonus: removing the test that tests that the transport is being stopped if the instance goes out of scope without first `disconnect()`ing first. This test is flakey and there is no good way of making it more reliable. The `websocket_transport` class is meant to only be used internally and we always `disconnect()` the transport when the connection is being stopped.
2015-03-25 21:28:34 -07:00
Xiaohongt 40c0fba0f5 Add test for progress messages 2015-03-24 15:45:24 -07:00
Xiaohongt 3910efbc01 Add tests which invoke hub methods with different type param 2015-03-24 12:17:42 -07:00
moozzyk 6b89090650 2.5.0 - moving to cpprestsdk 2.5.0
Note: cpprestsdk moved to shipping multiple smaller packages for different platforms so renamed SignalR package to reflect this. We would most likely adopt this model as well.
2015-03-23 10:56:11 -07:00
moozzyk 84a798e03d AlwaysRunBuildAfterRebase - fixing a build break 2015-03-20 18:25:19 -07:00
Pawel Kadluczka 4bc4efec60 GhostsFromThePastLife - fixing a bug where stray errors caused reconnects
When we stop a connection we just signal that the transport should be stopped but don't wait for it to actually stop. If then the same connection is immediately started the old transport can still be running. Because the callbacks are not reset when stopping the transport errors and messages from the old transport can still invoke them on the newly started connection. This is especially harmful in case of errors because they would cause reconnects. The fix is to ignore any message or error received from a transport started by a connection that has already been stopped.
2015-03-20 18:09:30 -07:00
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 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 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 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 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