Commit Graph

301 Commits

Author SHA1 Message Date
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
Mikael Mengistu 72514f3943 Removing the connected event (#989) 2017-10-05 11:12:18 -07:00
Pawel Kadluczka 7c90e80b3f Merge branch 'rel/1.0.0-alpha2' into dev 2017-10-02 10:07:16 -07:00
Pawel Kadluczka 70df19c8a2 Fixing MsgPack serializing byte[] as string Part 1
Enabling sending byte[] from server to client.
2017-09-29 17:05:24 -07:00
Pawel Kadluczka 05da66ada0 Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-28 17:52:25 -07:00
Pawel Kadluczka 4f4fb174ea Replacing 8-byte-long length prefix with varint 2017-09-28 17:00:49 -07:00
David Fowler 2adf24d1c6 Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-25 23:44:25 -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
David Fowler 000f9cb192 Initial support for websocket subprotocols (#933)
* Initial support for websocket subprotocols
- Exposes a SubProtocol property on WebSocketOptions that picks the
protocol for all connections on the end point.
- This is required for things like mqtt over websockets (the SubProtocol in
this case is something like mqtt or mqttv3.1)
- Added test

#402
2017-09-25 15:17:45 -07:00
David Fowler 5497c7d4ce Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-25 08:31:02 -07:00
David Fowler 26255cc29c Check for null before sending to a specific connection id (#935)
* Check for null before sending to a specific connection id
- Added some tests for the DefaultHubLifetimeManager

#905
2017-09-25 08:26:24 -07:00
moozzyk c0713c9916 Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-25 08:17:27 -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
David Fowler 65cd41dbf5 Block POST requests for websocket connections (#934) 2017-09-23 17:49:19 -07:00
Pawel Kadluczka 8743723ece Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-21 23:00:20 -07:00
Pawel Kadluczka 4db78685dc camelCasing objects serialized by JsonHubProtocol
Fixes: #859
2017-09-21 22:58:59 -07:00
Pawel Kadluczka 126901a08f Adding default ctors for HubProtocols 2017-09-21 15:30:23 -07:00
Pawel Kadluczka ba25dee141 Enabling customizing serialization settings in MessagePack protocol 2017-09-21 15:30:23 -07:00
Pawel Kadluczka dd07ab1735 Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-20 15:31:56 -07:00
FTWinston a7fb243501 Added typed HubContext 2017-09-19 16:16:31 -07:00
David Fowler 24455da8fb Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-18 20:46:14 -07:00
David Fowler 48d97bf271 Turned Stream into StreamAsync (#902)
* Turned Stream into StreamAsync
- Before we were fire and forgetting the invocation that initiated
the streaming, this changes that so that the caller now has to await
to get the channel.

#899
2017-09-18 16:44:18 -07:00
David Fowler 2efbd6a95a Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-18 14:14:23 -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
Mikael Mengistu e42f6980b6 Add Hub<T> Functional Tests (#891) 2017-09-15 13:59:44 -07:00
Pawel Kadluczka b093f2b279 Merge branch 'rel/1.0.0-alpha1' into dev 2017-09-13 13:55:06 -07:00
Pawel Kadluczka d226b20756 Rename With/GetTransportType to With/GetTransport 2017-09-13 09:46:17 -07:00
David Fowler 11cc57ee0e Merge branch 'rel/1.0.0-alpha1' into dev
# Conflicts:
#	src/Microsoft.AspNetCore.SignalR.Client.Core/Microsoft.AspNetCore.SignalR.Client.Core.csproj
2017-09-13 09:20:53 -07:00
David Fowler 2e695c935e Made tweaks to .NET client logging API (#869)
- Removed ConnectionFactoryDelegate and used Func<IConnection>
- Changed WithLogger that accepts ILoggerFactory to WithLoggerFactory
- Made UseLogger configure the existing ILoggerFactory or create a LoggerFactory
- Add support for setting the log level for console logs
- Updated tests
2017-09-13 09:18:06 -07:00
Pawel Kadluczka 5d7b706c4d Merge branch 'rel/1.0.0-alpha1' into dev 2017-09-13 09:15:08 -07:00
Pawel Kadluczka 1453f419a8 MessagePack Serialization fixes
* serializing user objects as maps (#863)
* enabling serializing objects that potentially cannot be deserialized (#862)
2017-09-13 08:50:04 -07:00
Pawel Kadluczka 240c09034e Merge branch 'rel/1.0.0-alpha1' into dev 2017-09-12 13:08:15 -07:00
Pawel Kadluczka 35683fb2b8 Fixing a bug where adding protocol with build would have no effect 2017-09-12 13:06:38 -07:00
BrennanConroy ef4da90c91 Merge branch 'rel/1.0.0-alpha1' into dev 2017-09-11 16:55:57 -07:00
BrennanConroy 393ab6a4f0 Add extension method to get HttpContext on HubConnectionContext (#849) 2017-09-11 16:55:32 -07:00
LivioF fea0db3814 Renamed private fields according to coding guidelinesù 2017-09-11 10:33:00 -07:00
Pawel Kadluczka eec4b33cff Merge branch 'rel/1.0.0-alpha1' into dev 2017-09-07 14:25:43 -07:00
Pawel Kadluczka 62bbe943e8 Make sure long polling transport can survive http client timeout 2017-09-07 14:14:52 -07:00
Pawel Kadluczka 225d2ed6f1 Merge branch 'rel/1.0.0-alpha1' into dev 2017-09-07 10:30:31 -07:00
Pawel Kadluczka 4ac8e786cf Adding HubConnectionBuilder 2017-09-07 10:04:42 -07:00
Pawel Kadluczka 8ff6a4b624 Merge branch 'rel/1.0.0-alpha1' into dev 2017-09-07 09:52:28 -07:00
Pawel Kadluczka 9e614b6cc7 Initializing HubOptions.JsonSerializationSettings to default settings 2017-09-07 09:51:20 -07:00
Pawel Kadluczka 269e1d1b5e Merge branch 'rel/1.0.0-alpha1' into dev 2017-09-05 12:22:49 -07:00
Pawel Kadluczka ceff4bd7da Exceptions from user's event handlers should be caught and logged
Otherwise they can spoil event queue and make the client not raise the Received event anymore

Fixes: #818
2017-09-05 12:21:47 -07:00
Nate McMaster d3ae3abe2a Use PackageLineup to manage PackageReference versions 2017-09-01 16:34:32 -07:00
BrennanConroy 7418785a5e Fix WebSocket race in E2E test (#809) 2017-08-31 15:30:55 -07:00
Mikael Mengistu 8ec2848646 AllExcept for Dynamic and Typed Hubs (#796) 2017-08-31 15:30:19 -07:00
Nate McMaster 5b767e05b4 Lift local function to class function to workaround issue in xunit.analyzers and roslyn 2017-08-31 13:42:44 -07:00
Pawel Kadluczka 5dceaa8149 Adding Microsoft.AspNetCore.SignalR.Client 2017-08-31 10:10:02 -07:00