Commit Graph

186 Commits

Author SHA1 Message Date
Dylan Dmitri Gray 748e992865
Dygray/handshake versioning (#2520)
* set minor versions on the protocols
2018-07-05 16:42:42 -07:00
Andrew Stanton-Nurse 5b22616a63
Fix tests when running on non-US locale (#2501) 2018-06-15 15:19:00 -07:00
Dylan Dmitri Gray 3d0f68b22c
server closes connections that have gone silent (#2364) 2018-06-05 15:21:55 -07:00
Dylan Dmitri Gray f0f1df9b4a
PingInterval -> KeepAliveInterval (#2384) 2018-05-25 15:15:38 -07:00
James Newton-King 02a9bde10d
Fix flaky ClientPingsMultipleTimes test (#2368) 2018-05-24 17:29:15 +12:00
James Newton-King 5c633aa183
Log 404 responses from long polling transport DELETE as Debug instead of Error (#2366) 2018-05-24 14:21:48 +12:00
Dylan Dmitri Gray 736b7f5042
Client pings server on interval (#2309) 2018-05-23 13:53:23 -07:00
James Newton-King eaa03679de
Fix flakey tests from SSE receiving a 404 response on stop (#2282) 2018-05-17 18:31:56 +12:00
Mikael Mengistu 283297f455
Remove handlers from HubConnection (#2267) 2018-05-15 23:57:02 -07:00
James Newton-King 7625bbcb6c
Add HubConnection.State (#2204) 2018-05-14 19:23:00 +12:00
BrennanConroy 7916f95235 Merge branch 'release/2.1' into dev 2018-05-10 16:54:26 -07:00
BrennanConroy 4b1fb58a8a
Throw error on unexpected close (#2205) 2018-05-10 16:38:21 -07:00
Mikael Mengistu 62d892315b
Merge pull request #2224 from aspnet/release/2.1
Use params passed into HubConnectionBuilder (#2223)
2018-05-07 21:44:04 -07:00
Mikael Mengistu 6f6382799b
Use params passed into HubConnectionBuilder (#2223) 2018-05-07 18:19:20 -07:00
Andrew Stanton-Nurse 622e133a8a
fix #2134 by disposing httpconnection if start fails (#2137) (#2188) 2018-05-02 13:10:58 -07:00
James Newton-King 9f40bd639f
Merge pull request #2186 from aspnet/release/2.1
Fix not setting HttpConnection.ConnectionId (#2154)
2018-05-01 23:01:20 -07:00
James Newton-King 41c8dcf449
Fix not setting HttpConnection.ConnectionId (#2154) 2018-05-01 21:48:57 -07:00
Andrew Stanton-Nurse 2a236193da
Merge pull request #2184 from aspnet/release/2.1 2018-05-01 16:37:54 -07:00
Andrew Stanton-Nurse d711916ad6
fix #2140 by ensuring the access token flows to WebSocketTransport (#2173) 2018-05-01 16:14:24 -07:00
Andrew Stanton-Nurse bd46d757ba
fix #2134 by disposing httpconnection if start fails (#2137) 2018-04-23 12:38:37 -07:00
BrennanConroy 1c9607a1ed
Verify Verifiable spelling (#2114) 2018-04-22 21:33:57 -07:00
Andrew Stanton-Nurse 6b6d890c8f
fix #2078 by adding locking (#2079) 2018-04-19 15:32:04 -07:00
David Fowler 903fe1e902
Added support for negotiate response to redirect the client to another SignalR endpoint (#2070)
- Add a SkipNegotiation flag to the .NET and ts client
to allow skipping the negotiation phase. Don't infer it based on the transport type.
-  Updated the negotiate protocol to support returning a redirect url
- Added support to .NET client to handle redirect negotiations
- Handle poorly written endpoints that sends infinite redirects
- Added access token support and an infinite redirect guard
- Add delete handler for stopping the transport
2018-04-18 14:22:45 -07:00
David Fowler 05d6bbb782
Flush first long poll immediately (#2032)
There was a race condition between the first poll and any other http request that was sent. 
In particular, if you called StartAsync then StopAsync it was possible for the delete to happen before the poll started leading to 400 errors. This change fixes that by making the very first poll
return immediately so that the client can use that to determine if there was an error connecting.
2018-04-17 00:49:26 -07:00
Andrew Stanton-Nurse c05c5a6b2a
React to aspnet/KestrelHttpServer#2496: make IConnectionInherentKeepAliveFeature a boolean feature (#2041) 2018-04-16 11:34:12 -07:00
David Fowler a5d9930802
API review changes (#2043)
- Make SerializedHubMessage and SerializedMessage
public
- Made HubConnectionStore public
- Move SendUtils and Utils to the internal folder
- Make Microsoft.AspNetCore.Http.Connections.Common/Internal public.
- Move InvocationRequest to internal folder
2018-04-16 10:31:10 -07:00
James Newton-King 6eac7049ba
Update text and binary formatter helpers to be shared (#2035) 2018-04-16 15:19:34 +12:00
James Newton-King ddc905c219
Add VerifyNoErrorsScope (#1972) 2018-04-15 11:12:21 +12:00
David Fowler 4fe41dc6d0
Increase timeout of test (#2021)
- Seems like it was possible for the server timeout to happen *before* the invocation happened.
- Added logging to the test
2018-04-14 05:05:49 -07:00
David Fowler d6395a52bc
Send delete request after poll ends (#2020)
* Added test and fixed other test
2018-04-14 04:45:16 -07:00
James Newton-King e4d0f2980e
Microsoft.AspNetCore.SignalR.Client refactor (#2000) 2018-04-14 21:09:41 +12:00
Mikael Mengistu 623ab63091
HubConnectionTests.Helper Header (#2011) 2018-04-13 21:32:26 +00:00
Andrew Stanton-Nurse 43e6ab750a
Fix #1927 by using Synchronous Callbacks everywhere. (#2003) 2018-04-13 11:38:03 -07:00
David Fowler 3e69fdc4ad
Delegate disposable to the IConnectionFactory (#1999)
- Added DisposeAsync to the IConnectionFactory. It's responsible for disposing the connection after the pipe has closed.
- Added dispose callback to WithConnectionFactory
- Don't wait for poll request to end before unwinding from the transport
- Make sure all http requests are done before returning from StopAsync in both SSE and longpolling
2018-04-13 09:16:23 -07:00
David Fowler abe139ee16
Make the protocol and messages public (#1994)
* Move types to a .Protocol namespace
2018-04-13 01:53:41 -07:00
James Newton-King 198013bfa3
Microsoft.AspNetCore.Http.Connections.Client refactors (#1995) 2018-04-13 20:13:58 +12:00
David Fowler 4a568e90d2
API review changes (#1992)
- Changed GetMessageBytes to return ReadOnlyMemory
- Make HandshakeProtocol.SuccessHandshakeData a readonly field
2018-04-13 00:25:02 -07:00
Mikael Mengistu 70c63fe9e8
Http.Connections.Client API Review changes (#1987) 2018-04-13 06:52:27 +00:00
= d5a4d9b8c5 Update usage of TestSink 2018-04-12 16:58:19 -07:00
Andrew Stanton-Nurse 24328b8e88
fix #1281 by adding support for DELETE endpoint on server (#1925) 2018-04-12 12:39:08 -07:00
James Newton-King 1ae901de3d
Fix incorrect test for long poll and web sockets requests (#1971) 2018-04-12 18:21:05 +12:00
David Fowler cb5bba36fc
Get off the event loop before dispatch (#1952) 2018-04-11 10:39:09 -07:00
James Newton-King 12b69a0fdb
Refactor HttpOptions in client (#1942)
- Rename HttpOptions to HttpConfigurationOptions
- Remove HttpConfigurationOptions from SignalR client project
- Updated client HttpConnection ctors
2018-04-11 20:20:04 +12:00
Ben Adams 8a3516284e Add GetMessageBytes to IHubProtocol (#1915) 2018-04-10 07:14:09 -07:00
Vegard Løkken 31dfe91962 Support async access token factory (#1911) 2018-04-10 05:34:10 -07:00
BrennanConroy 6d050140e5
Swtich to MessagePack-CSharp (#1879) 2018-04-09 17:04:32 -07:00
David Fowler 9fd713c73a
Make MemoryBufferWriter a Stream (#1907)
- Get rid of LimitArrayPoolWriteStream and use MemoryBufferWriter in its place in the MessagePackProtocol implementation.
- Added tests for MemoryPoolBufferWriter and fixed a bug in CopyToAsync
- Added CopyTo(`IBufferWriter<byte>`)
- Changed MemoryBufferWriter to fill the underlying arrays that back segments, the segment size is now a minimum.
2018-04-08 16:11:17 -07:00
James Newton-King 27d18578d0
Use expression body properties and implicit arrays where possible (#1906) 2018-04-08 21:40:01 +12:00
David Fowler 0d9c3d8898
Buffer messages so we get a single outgoing request (#1898) 2018-04-07 16:41:52 -07:00
David Fowler c1049b722d
The grand unification of ConnectionContext (#1895)
This change rationalizes the 2 very similar abstractions that exist in Connections.Abstractions, IConnection and ConnectionContext. It also introduces an IConnectionFactory to SignalR that is used to create a new ConnectionContext for a HubConnection.

- HubConnection just completes both ends of the transport pipe instead of calling DisposeAsync.
- Implemented ConnectionContext on HttpConnection and added HttpConnectionFactory
-  Updated tests
2018-04-07 16:19:01 -07:00