Commit Graph

192 Commits

Author SHA1 Message Date
David Fowler 6c22f25818
Client pipelines (#1435)
- Reworked the Client to be based on pipelines instead of Channels
- SendAsync no longer fails if the http request itself fails but the connection is closed as a result.
- Updated tests
- Base64Encoder needed to support multiple messages in the same span of data
2018-02-12 22:27:43 -08:00
David Fowler 75efe025c3 Skipping flaky tests 2018-02-10 22:17:07 -08:00
Andrew Stanton-Nurse 0435b6dc6e
add headers and revamp msgpack tests (#1382) 2018-02-07 09:36:29 -08:00
BrennanConroy 5ade419c53
Fix flaky test (#1397) 2018-02-01 15:13:40 -08:00
Andrew Stanton-Nurse b61dc35ee6
fix #1199 by suppressing ODE in received callback (#1395) 2018-02-01 15:08:52 -08:00
Pavel Krymets ac9db5dc7b
React to pipeline changes (#1365) 2018-01-29 14:36:03 -08:00
BrennanConroy a449345436
Clean up logging (#1308) 2018-01-22 09:37:53 -08:00
Andrew Stanton-Nurse 144984e599
Split MsgPack into separate assembly (#1274) 2018-01-10 14:20:57 -08:00
Pavel Krymets 8a4adf1cb6
React to pipeline changes (#1250)
React to pipeline changes
2018-01-04 09:56:39 -08:00
Andrew Stanton-Nurse 3bb71255d4
clean up HttpConnectionTests (#1208) 2017-12-19 11:12:39 -08:00
Andrew Stanton-Nurse 00a6dc983a
Fix #1170 by removing invocationId from non-blocking calls (#1218) 2017-12-19 10:40:58 -08:00
Pawel Kadluczka 66ab939cff Making HttpConnection restartable (C#) (#1147)
🎉
2017-12-12 10:08:42 -08:00
Andrew Stanton-Nurse a8330067c4
Implement #1157 by adding client timeout for C# client (#1165) 2017-12-07 14:54:41 -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 e4671392ec
Fix #1140 by plumbing WebSocketOptions up to HttpOptions (#1174) 2017-12-02 17:01:53 -08:00
Pawel Kadluczka 0bafb304c2 Adding support for JWT in the C# client
Fixes: #1018

(Bonus: also enabling passing headers)
2017-11-21 16:32:56 -08:00
BrennanConroy 93cbf4dbef
Change negotiate to POST (#1122) 2017-11-17 15:31:47 -08:00
Pranav K 439f2a7892 Update samples and tests to target netcoreapp2.1 2017-11-16 13:38:46 -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
Pawel Kadluczka 379160707f
Switching to new base64 APIs (#1127) 2017-11-16 09:20:40 -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
Mikael Mengistu 1a21fd49b1
Changing the Closed Event to be a Task (#1080) 2017-11-09 17:51:13 -08:00
Pawel Kadluczka 06475270ec
Actually throwing exceptions from SendAsync (#1084)
SendAsync was using InvokeCoreAsync code to send messages. In case of exception InvokeCoreAsync is blocking and returns a task to the user so they can await for the remote call to complete. Any exception thrown is caught and used to fail the task returned to the user. SendAsync does not return a special task to the user so re-using InvokeCore resulted in swallowing exceptions. While SendAsync is fire and forget it actually should throw if the message could not be send and it was not happening.

While adding tests it turned out we did not test cases where Invoke/SendAsync/StreamAsync were invoked before starting the connection and this resulted in a NullReferenceException. I also fixed that.
2017-11-03 13:15:11 -07:00
Nate McMaster e15a38a14c Pin package and tool versions to make build more repeatable 2017-11-01 16:40:51 -07:00
Pawel Kadluczka 18f770e937
Late parameter binding (#1049)
Late parameter binding

Storing exception thrown during parameter binding and rethrowing when the method is about to throw. This allows completing invocations with a HubException and keeping the connection open.
We will also no longer close the connection if parameters for client side methods cannot be bound. We will log and continue.

Fixes: #818

(Also fixing #1005 because I was just touching this line)
2017-10-30 11:31:57 -07:00
Mikael Mengistu eec6b4f2f5 Removing Connected event from TestConnection (#1055) 2017-10-24 23:23:56 -07:00
Mikael Mengistu 1768a081ba Updating default pattern(#1046) 2017-10-23 22:20:31 -07:00
Pawel Kadluczka 8d1d6d0300 Adding StreamCompletion message (C#) 2017-10-19 18:20:03 -07:00
Mikael Mengistu 04d4da2987 Replace Received Event with OnReceived (#1006) 2017-10-18 17:10:51 -07:00
Mikael Mengistu 72514f3943 Removing the connected event (#989) 2017-10-05 11:12:18 -07:00
Pawel Kadluczka 8743723ece Merge branch 'rel/1.0.0-alpha2' into dev 2017-09-21 23:00:20 -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
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
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 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
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 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
Pawel Kadluczka 5dceaa8149 Adding Microsoft.AspNetCore.SignalR.Client 2017-08-31 10:10:02 -07:00
Pawel Kadluczka 36acebf9fb Renaming Microsoft.AspNetCore.SignalR.Client to Microsoft.AspNetCore.SignalR.Client.Core 2017-08-31 10:10:02 -07:00
Nate McMaster 9c0dc52d67 Use Directory.Build.props/targets 2017-08-29 10:17:20 -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
Pawel Kadluczka 5ad5f36f88 Changing length prefixing to separator for JSON C# 2017-08-18 09:50:45 -07:00
Pawel Kadluczka a359da0c44 Length prefixing base64 encoded messages
... in preparation for pipeline conversion
2017-08-17 09:58:16 -07:00
Pawel Kadluczka a0e490e549 Enabling binary protocols over text transports 2017-08-08 12:11:55 -07:00
Pawel Kadluczka ae815475b8 Support for binary protocols on the server side 2017-07-20 17:46:45 -07:00
Mikael Mengistu 8fc2cd98b6 Add timeout to Event Queue drain (#619) 2017-07-19 11:47:47 -07:00
Pawel Kadluczka 0ebd33a25c Plumbing TransferMode on the client side 2017-07-14 10:45:28 -07:00
Pawel Kadluczka 2854e868ec Adding tests for SSE transport #413 2017-07-13 09:14:03 -07:00
BrennanConroy bcefbae00c Complete logging for Socket.* packages (#655) 2017-07-12 16:16:09 -07:00
Pawel Kadluczka a41ef82f19 Exiting SSE transport receive loop when transport is stopping
Fixes: #650
2017-07-10 17:56:24 -07:00
Mikael Mengistu 2597e52e53 Rename HubConnection Extension Methods from Invoke to InvokeAsync (#637) 2017-07-05 22:56:03 -07:00
David Fowler 0f4295f90e Make parsers stateless (#628)
* Make parsers stateless
- Changed parser input to ReadOnlySpan<byte> to ReadOnlyBuffer<byte>
2017-07-01 23:44:22 -07:00
Mikael Mengistu d68de2b5ea Make Client Side Event Handlers Async (#610) 2017-06-28 22:39:59 -07:00
David Fowler 6332e98d03 Remove Try from Write methods (#614)
- We write to a Stream so it should never fail (it could throw
but that's not new).
2017-06-28 21:53:23 -07:00
David Fowler d6f5e16f38 Support non blocking send on client (#603)
* Added support for non blocking sends on HubConnection
- Renamed Invoke to InvokeAsync
- Add support for non blocking send to TS client
- Add tests to make sure that non blocking sends don't send responses
2017-06-28 21:00:13 -07:00
Pawel Kadluczka f8d91b54d4 MsgPack end-to-end
Plugging in MsgPack protocol
Adding negotiation message to hub protocol
2017-06-27 18:40:55 -07:00
Mikael Mengistu 13ef35fa79 Changed the handlers to be Func<object[], Task> (#578) 2017-06-27 10:14:58 -07:00
David Fowler a84ba8820f Use Channel<byte[]> as the abstraction (#579)
* Use Channel<byte[]> as the abstraction
2017-06-23 09:52:35 -07:00
David Fowler 41f54d001b Remove dependencies on a bunch of corefxlab things (#576)
* Remove dependencies on a bunch of corefxlab things
- Used Stream instead of IOutput
- Removed pipelines dependency in most places.
2017-06-22 09:23:52 -07:00
David Fowler 12917ef0e9 Re-layer the .NET Client into Http and non-Http (#544)
* Re-layer the .NET Client into Http and non-Http
- Moved IConnection to Sockets.Abstractions and removed
HttpConnection and TransportType dependency.
- Renamed Sockets.Client to Sockets.Client.Http
- Renamed Sockets.Common to Sockets.Common.Http
- Renamed Connection to HttpConnection
- Removed HTTP dependency from HubConnection
- Removed tests that were testing connection logic in HubConnection

#518
2017-06-09 08:58:54 -10:00
David Fowler 523517f60c Add support for timing out poll requests (#538)
* Add support for timing out poll requests
- Default poll request is 110 seconds (like in previous versions of SignalR)
- Use 200 with a 0 content length for timeouts.
- Added support for not timing out while debugging
2017-06-07 20:55:00 -10:00
Pawel Kadluczka a14a0ab039 Adding structured negotiate 2017-06-06 15:53:21 -07:00
David Fowler 5f6736a82f Removed unused parameter 2017-06-06 10:29:56 -07:00
David Fowler 59a8f5f3b5 Simplify the JSON and protobuf protocols (#524)
- Remove message type and message format
- Updated tests
2017-06-06 07:18:23 -10:00
David Fowler 38efde7b50 Merge transport and hub protocols (#517)
* Merge transport and hub protocols
- This change merges the transport and hub protocols into a single protocol. The
idea being that sockets in a purely streaming layer that sends frames from the underlying
transport. This makes things like TCP possible and doesn't impose a framing layer at the lowest
level. This will make it possible to build servers like kestrel on top of the TCP layer.
- The Message was removed from the lowest layer of the stack and pushed into the hubs layer. Hub invocations
are framed with what was before the transport protocol. Connections also need to state upfront if they support
binary or not. This will determine how data will be serialized to the specific connection.
- Changed the SSE parser and writer to be strictly SSE without any of the transport protocol specific
information.
- To ensure we aren't using types in the wrong layers
- Moved protocol logic into SignalR
- Socket.Abstractions is now the root of the universe, Sockets.Common will likely be removed
or turned into Sockets.Common.Http.
- Move SSE parser to Sockets.Client and SSE writer into Sockets.Http
- Moved tests into the appropriate test projects
- Updated the spec
2017-06-05 09:45:40 -10:00
David Fowler 42e2715a95 Removed EndOfMessage from Message (#513)
* Removed EndOfMessage from Message
- The webSockets transport no longer supports partial payloads so
this feature is now gone.
2017-06-03 08:32:28 -10:00
Andrew Stanton-Nurse 263dd0e4fe Fix #324 by adding streaming support to the server (#461) 2017-05-31 09:10:20 -07:00
Mikael Mengistu b862d35b10 Update Targets (#486) 2017-05-26 20:00:12 -04:00
David Fowler 240a88f7af Make the http end points more resty (#470)
- Use HTTP verbs to describe functionality for endpoints
- Updated TransportProtocols.md
2017-05-19 23:37:17 -07:00
Pawel Kadluczka 4bb9721d39 Adding strongly typed Invoke and On overloads
See: #311
2017-05-19 09:47:16 -07:00
Nate McMaster ef7a3514cd Upgrade test framework versions and fix test issues (#453) 2017-05-15 12:50:30 -07:00
Andrew Stanton-Nurse 991c1d8517 Implement new Hub Protocol (Part Deux) (#390)
* convert to new protocol
* removed InvocationDescriptorRegistry because we're not yet sure about custom protocols
* update SocialWeather sample
* Moving ts client to using new protocol
* make the functional tests a little easier to run on ctrl-f5
2017-05-09 12:24:58 -07:00
Mikael Mengistu 7f64811ccd Change targets (#437)
Target netcoreapp2.0
2017-05-04 14:05:58 -07:00
Andrew Stanton-Nurse 1018a20c61 more logging (#417) 2017-04-24 12:38:39 -07:00
moozzyk 04719dee82 Adding transport factory 2017-04-11 09:16:36 -07:00
Alexis Nowikowski 3d29b7854b Bugfix issue #355: Don't handle Invocation when no InvocationHandler … (#356)
- Don't handle Invocation when no InvocationHandler is present
2017-03-31 09:44:57 -07:00
moozzyk fb512bbf41 Using common XUnitLoggerProvider
Fixes #331
2017-03-27 16:19:40 -07:00
BrennanConroy 6130003193 Convert to netcoreapp2.0 (#338)
* Converted samples and test projects to run on netcoreapp2.0
2017-03-25 09:37:39 -07:00
Pawel Kadluczka e955c4b9aa Handling exceptions thrown when invoking a hub method (#332) 2017-03-22 11:06:47 -07:00
Andrew Stanton-Nurse ab3dce85fc tidy up status codes and transport conflicts (#306) 2017-03-20 09:48:15 -07:00