Commit Graph

518 Commits

Author SHA1 Message Date
James Newton-King e4d0f2980e
Microsoft.AspNetCore.SignalR.Client refactor (#2000) 2018-04-14 21:09:41 +12:00
Andrew Stanton-Nurse c7f7f36210
API Review for Http.Connections (#2010) 2018-04-13 16:35:07 -07:00
Mikael Mengistu 623ab63091
HubConnectionTests.Helper Header (#2011) 2018-04-13 21:32:26 +00:00
Andrew Stanton-Nurse 499d39b364
rename MsgPack assembly only (#2005) 2018-04-13 12:01:45 -07: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 83dec1093a
Fixed flaky longpolling tests (#1993)
- Wait for disposal and removal of the connection
2018-04-13 00:42:31 -07: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
Ahson Khan 0ee4a86564 Collapse AsSpan().Slice(..) into AsSpan(..) (#1991) 2018-04-12 23:15:47 -07:00
Mikael Mengistu 0053124ca4
Make Proxies Internal (#1982) 2018-04-13 00:38:16 +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
Andrew Stanton-Nurse 0992db9fd2
fix #1914 by switching RedisProtocol to MsgPack (#1968) 2018-04-12 12:10:51 -07:00
David Fowler 8b1a7e9199
API review feedback (#1974)
- Remove SetHttpContext
- Remove HttpContextFeature
- Add and implement IHttpTransportFeature on HttpConnectionContext
- Remove ConnectionMetadataNames
2018-04-12 03:50:14 -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
BrennanConroy c9ab30e150
Enable detailed errors for redis tests (#1962) 2018-04-11 15:14:34 -07:00
David Fowler 8cc851ff9b
Clean up timer code with custom awaitable (#1935)
- Gets rid of locks by using an event loop
2018-04-11 10:39:29 -07: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
James Newton-King b30c2fecbf
SSE formatting refactor (#1916) 2018-04-11 17:13:15 +12:00
Mikael Mengistu 83821a028d
Rename HubEndPointTestUtils folder (#1943) 2018-04-11 04:05:28 +00:00
James Newton-King c83baf2b76
Remove params from message ctors (#1931) 2018-04-11 12:11:13 +12:00
Mikael Mengistu e2169ceda6
Connect to Redis asynchronously (#1922) 2018-04-10 23:48:11 +00: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
James Newton-King bd78785f8d
Minor DefaultHubLifetimeManager improvements (#1904) 2018-04-09 12:31:14 +12: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
James Newton-King 0f663cadc4
readonly all the things (#1901) 2018-04-08 15:47: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
David Fowler e3da7feab4
Clean up client ITransport interface (#1893)
- Transports own the pipe creation. The fact they are 2 sides is an implementation detail.
2018-04-07 15:11:42 -07:00
David Fowler 86083c0302
Removing native support for IObservable<T> (#1890)
- There are too many issues and questions with respect to back pressure and the buffering policy we should use when the client being streamed to can't support the data being pushed via OnNext.
As a result, we're dropping support for IObservable but keeping ChannelReader and we'll eventually support IAsyncEnumerable when that makes it into the BCL.
- Add sample showing Observable -> ChannelReader adaption
2018-04-07 15:10:39 -07:00
James Newton-King acc0b7ad0d
Serialize NegotiateResponse with IBufferWriter (#1881) 2018-04-07 15:50:13 +12:00
David Fowler f632330d7f
Allocate pipe writer stream per connection (#1885)
- Don't create the PipeWriterStream per operation, make it per Connection
- Reduce the buffer size for CopyToAsync operations to 4K where possible instead of 81K (the default)
2018-04-06 14:36:35 -07:00
David Fowler e51676fb47 Policheck errors 2018-04-06 13:01:20 -07:00
David Fowler e3d90bdf6a
Fix graceful closing of pipes (#1882)
- Closing pipes gracefully in most cases. The only case where we forcefully close the pipes is during application shutdown
- Return 404 if sending to connection after disposal
- Added tests
2018-04-06 10:59:40 -07:00
Mikael Mengistu 4ddf8664c0
Don't throw from Observer's OnNext (#1872) 2018-04-06 00:35:04 -07:00
James Newton-King 36edadabb4
Lock when sending data to connection (#1876) 2018-04-06 16:25:47 +12:00
James Newton-King cb5ece8a24
HttpTransportType refactor (#1873)
- Rename file to HttpTransportType.cs
- Add HttpTransportType.None
- Move All to static readonly field
- Make TransportType on client and service HttpConnectionOptions consistent
- Move setting defaults into ctor
2018-04-06 16:18:47 +12:00
James Newton-King 921986d561
Fix AccessTokenFactory not being called with each request (#1880) 2018-04-06 15:46:36 +12:00
BrennanConroy b0c4e9d0f7
0 byte read in WebSockets (#1878) 2018-04-05 18:50:30 -07:00
BrennanConroy 307ed01051
ReEnable SSETransportStopsSendAndReceiveLoopsWhenTransportStopped (#1877) 2018-04-05 17:16:39 -07:00
Andrew Stanton-Nurse 19b2fea0d8
Preserialize for all formats when sending through Redis (#1843) 2018-04-05 13:48:14 -07:00
David Fowler 39f693b9ed
Found these while looking at a flaky test (#1871)
- Fix crashing test
- Dispose the ClientWebsocket in StopAsync
2018-04-05 12:47:39 -07:00
David Fowler 11343ea15d
Add logging by default to HubConnectionBuilder (#1867)
- Use the AddLogging extension method by default in the HubConnection
- Removed WithConsoleLogger extension methods
- Removed WithLoggerFactory extension method (moved to test only)
- Added WithLogger that uses the new the new ILoggerBuilder
2018-04-05 10:05:07 -07:00