Commit Graph

72 Commits

Author SHA1 Message Date
James Newton-King 1c44e8febf
Fix streaming hub methods combined with async (#1544) 2018-03-07 20:07:06 +13:00
Mikael Mengistu 1b9313287b
Restrict HubProtocol on Server + HubOptions<THub> (#1492) 2018-03-07 01:31:56 +00:00
James Newton-King 846432c9ac
Improve unexpected server error message to client (#1532)
* Improve unexpected server error message to client

* Separated expected vs unexpected errors in error message. Fixed broken tests

* Fix ts functional tests
2018-03-06 22:11:46 +13:00
BrennanConroy 1790d6bdf0
Serialize once per format to increase perf in broadcasting scenarios (#1498) 2018-02-27 14:55:00 -08:00
David Fowler e1bb2215e5
Remove the Channel<HubMessage> from the HubConnectionContext (#1468)
* Remove the Channel<HubMessage> from the HubConnectionContext
- Replace the channel with a single lock around the pipewriter. Since writes are always synchronous, the lock is held for a very short time.
- We were only using them in this scenario for handling multiple producers (the hub output, the keep alive ping and the broadcast).
- Handle the scenario where there's back pressure (when we use pipes that are bounded) and give callers a single task representing when back pressure is released.
- Handle synchronous exceptions in RedisHubLifetimeManager
- Fixed benchmarks
2018-02-17 10:22:11 -08:00
David Fowler 28439d1441
Initial changes to move to pipelines (#1424)
- Change the Sockets abstraction from Channel<byte[]> to pipelines.

#615
2018-02-09 17:45:21 -08:00
Andrew Stanton-Nurse 0435b6dc6e
add headers and revamp msgpack tests (#1382) 2018-02-07 09:36:29 -08:00
BrennanConroy 67c76287ed
Return stream method error to client (#1331)
* Return correct error to client from failing stream method
2018-01-24 09:08:27 -08:00
BrennanConroy d38764a8f0
Rename InvokeAsync to SendAsync on the server (#1312) 2018-01-19 11:32:50 -08:00
Andrew Stanton-Nurse 144984e599
Split MsgPack into separate assembly (#1274) 2018-01-10 14:20:57 -08:00
Mikael Mengistu 89b532c985
Invoke Users (#1257) 2018-01-08 17:58:42 -08:00
Mikael Mengistu 8b34b7f2ae
Invoke Multiple Groups (#1254) 2018-01-05 13:57:19 -08:00
Mikael Mengistu 738617266e
Invoke Multiple Connections (#1242) 2017-12-21 15:19:43 -08:00
Mikael Mengistu ac236efdae
Refactoring HubEndpointTests (#1231) 2017-12-19 15:01:49 -08:00
Andrew Stanton-Nurse 00a6dc983a
Fix #1170 by removing invocationId from non-blocking calls (#1218) 2017-12-19 10:40:58 -08:00
Mikael Mengistu c8bd72be36
Others in Group (#1230) 2017-12-18 15:27:56 -08:00
Mikael Mengistu eb2668e74e
AllExcept for Groups - GroupExcept (#1204) 2017-12-15 17:34:08 -08:00
Mikael Mengistu 75e102f97a
Support for Others and Caller Client Subsets(#1192) 2017-12-11 17:30:53 -08:00
Andrew Stanton-Nurse ae9c3cf04d
expand ping test expectations to avoid flakiness (#1181) 2017-12-05 10:46:12 -08:00
Andrew Stanton-Nurse c1d2024864
Implement #1156 by having the server send Ping messages (#1161) 2017-12-04 14:43:27 -08:00
Andrew Stanton-Nurse 3005337a9c
fix #625 by implementing HubMethodNameAttribute (#1173) 2017-12-01 09:48:26 -08:00
Andrew Stanton-Nurse cb3124be17
First pass at Keep Alive (#1119)
This adds the Ping message type and support for sending/receiving it in the Hub Protocols. It does not add the logic to transmit keep-alive frames.
2017-11-16 09:45:13 -08:00
BrennanConroy 792745ad98 React to CoreFxLab packages (#998) 2017-11-13 15:05:35 -08:00
Pawel Kadluczka ff12b9b20c Replacing StreamCompletion with StreamInvocation 2017-11-13 10:50:15 -08:00
Pawel Kadluczka cc42b0eaef Fixing a bug where cancellation could result in HubException
When the client cancels a streaming method the server would send an error completion. This was not correct because cancellation is not an error. We did not see this because our client ignores any messages for a given streaming invocation after sending a CancelInvokationMessage but other clients may want to drain messages before considering a streaming method canceled.
2017-11-01 20:20:43 -07:00
Mikael Mengistu 5ffb082acb Add Missing Await in Test (#1045) 2017-10-22 23:37:12 -07:00
Pawel Kadluczka 8d1d6d0300 Adding StreamCompletion message (C#) 2017-10-19 18:20:03 -07:00
BrennanConroy 8701baf73d Add negotiate timeout option to hub options (#1003) 2017-10-11 08:59:37 -07:00
BrennanConroy de2e0967c3 Adding CancelInvocation message (#979)
* For Streaming only. And C# client only.
2017-10-06 15:55:39 -07:00
ivankarpey 665f166d67 fix issue with incorrect user detection when Invoking for User (#747)
* fix issue with incorrect user detection when Invoking for User

* fix failed testcases

* use proper extension method to avoid potential null reference exception

* fix for channel name in redis version + follow SignalR team recommendations

* remove unncessary freespace

* remove whitespaces

* introduce IUserIdProvider to resolve user id

* Move IUserIdProvider from HubLifetimeManager to HubConnectionContext

* setting user id to connection context in hubendpoint
2017-10-06 11:58:18 -07:00
David Fowler 9df8d2f795 Remove the params argument from IClientProxy (#946)
* Remove the params argument from IClientProxy
- This allows passing arrays without having to explicitly ToArray() or AsEnumerable()
- Added overloads up to 10 arguments
- Added tests
2017-09-25 21:01:52 -07:00
Pawel Kadluczka 0267695656 Exceptions thrown during writing should close the connection
We need to close the connection if there is an exception when writing to the transport on the server side. Currently if an exception happens it leaves the connection in an unsable state - after the exception no messages from the server will be sent to the client because the writing loop is terminated. Ignoring the message could cause hangs on the client side since we can fail while writing a completion message. In this case if the client is awaiting the invocation it will hang because the task will never be completed.
2017-09-25 08:13:46 -07:00
Pawel Kadluczka 4db78685dc camelCasing objects serialized by JsonHubProtocol
Fixes: #859
2017-09-21 22:58:59 -07:00
Pawel Kadluczka ba25dee141 Enabling customizing serialization settings in MessagePack protocol 2017-09-21 15:30:23 -07:00
FTWinston a7fb243501 Added typed HubContext 2017-09-19 16:16:31 -07:00
David Fowler a93e4be82f Added Cancellation support (#897)
* Added Cancellation support
- Added ConnectionAbortedToken to the HubConnectionContext. This allows
arbitrary code to access a handle that represents the connection lifetime
without handling OnDisconnectedAsync on the hub itself.
- Expose Abort on HubConnectionContext to allow server side methods to
abort the connection.
- Use the Abort to stop the main loop when unexpected invocation errors happen.
- Use the connection aborted token as unsubscribe from the IObservable and to complete
the IAsyncEnumerator for streaming results.
2017-09-18 12:47:38 -07:00
BrennanConroy 393ab6a4f0 Add extension method to get HttpContext on HubConnectionContext (#849) 2017-09-11 16:55:32 -07:00
Mikael Mengistu 8ec2848646 AllExcept for Dynamic and Typed Hubs (#796) 2017-08-31 15:30:19 -07:00
BrennanConroy 978f5cebc0 Starting HubOptions (#743)
* Added JsonSerializerSettings
2017-08-23 15:30:08 -07:00
Nate McMaster 629dd34977 Upgrade to xunit 2.3.0-beta4 (#754)
Removes unused theory parameters
2017-08-23 10:02:15 -07:00
Mikael Mengistu d469cc3151 Clients Subset - AllExcept (#700) 2017-08-22 17:33:27 -07:00
BrennanConroy 345190e6a9 Add timeout to Negotiate (#736) 2017-08-18 15:51:01 -07:00
BrennanConroy b12451025f Exit OnConnected early if Negotiate fails (#733) 2017-08-17 23:34:45 -07:00
Pawel Kadluczka 29f9c54b86 Updating xUnit version 2017-08-10 19:00:31 -07:00
Mikael Mengistu 8cda36157f Change Read to ReadAsync (#702) 2017-08-09 16:35:44 -07:00
Mikael Mengistu 32ef3eb355 Hub<T> (#689) 2017-08-08 17:39:09 -07:00
Mikael Mengistu 8ba29b578d Dynamic Hub Change Part 2 (#644) 2017-07-14 15:54:31 -07:00
Pawel Kadluczka 2854e868ec Adding tests for SSE transport #413 2017-07-13 09:14:03 -07:00
David Fowler 595f783857 Features everywhere (#639)
* Features everywhere
- The goal here is to move things closer to the final design where
ConnectionContext represents a very low level primitive that represents
any connection like transport. As part of that change, we remove unnecessary
properties like User and move those into features. They temporarily live in the same
assembly but they are not required by ConnectionContext.
- Used features for Hubs instead of Metadata
- Metadata is no longer thread safe
2017-07-06 11:27:16 -07:00
Mikael Mengistu cfaa4b69d7 Dynamic Hub Work Part 1 (#636)
Getting rid of TClient
2017-07-05 22:55:16 -07:00