Commit Graph

456 Commits

Author SHA1 Message Date
Pavel Krymets d23f2beafc
Merge release/2.1 into dev (#1834) 2018-04-03 10:45:44 -07:00
James Newton-King 416b27c6d6
Fix build (#1825) 2018-04-03 11:45:05 +12:00
James Newton-King 3460d44848
Fix non-serializable tests (#1820) 2018-04-03 09:31:52 +12:00
BrennanConroy 5ce672dfe6
ThreadStatic MemoryBufferWriter (#1821) 2018-04-02 11:25:04 -07:00
BrennanConroy 6640f14e35
Detailed errors enabled for functional tests (#1822) 2018-04-02 10:42:26 -07:00
David Fowler e6e45cea05
Change how HttpConnection sets headers (#1806)
- Removed SendUtils.PrepareRequst and instead used HttpClient.DefaultRequstHeaders to set the common headers to apply HttpOptions to all outbound requests
- Modified how we check for the user agent request testing
2018-03-31 22:23:09 -07:00
James Newton-King 04a22f23dd
Deserializing ISO formatted strings in method arguments (#1812) 2018-04-01 12:26:30 +12:00
BrennanConroy 903a9ea6a0
Use IBufferWriter in IHubProtocol (#1791) 2018-03-30 17:30:08 -07:00
David Fowler eb7dc14c39
Handle uninitialized connections in disposal (#1786)
- We made a change to not initialize pipes up front
on connection creation. That change make it null ref in disposal because we didn't check if the pipes were initialized.
- Added a test
- Also fixed the EchoConnectionHandler in the functional ts tests.
2018-03-30 15:44:30 -07:00
Andrew Stanton-Nurse 6b3a27e73c
Bedrock Renames (#1777) 2018-03-30 15:09:19 -07:00
James Newton-King 0362905a70
Re-enable ConnectionCanSendAndReceiveMessages + logging (#1778) 2018-03-31 08:45:33 +13:00
Mikael Mengistu 313133131f
Check for Websockets in Fallback functional tests (#1772) 2018-03-30 12:33:42 -07:00
BrennanConroy 44b667b3e6
Add detailed error option (#1763) 2018-03-30 11:30:07 -07:00
David Fowler a26e6f5a30
Make shutdown logic for SSE and LongPolling more similar to WebSockets (#1779)
- Cancel reading from the application when initiating a transport stop
- Complete each side of the pipe in the place where the pipe is being consumed
- Errors from sending end up getting sent to the application
- The Running task never throws
- Removes ContinueWith
2018-03-30 01:50:30 -07:00
BrennanConroy 46f27cdd0b
Fix internal HubConnection state when handshake fails (#1774) 2018-03-29 16:35:31 -07:00
David Fowler 7a53e07623
Parse data as it comes in off the wire in the .NET client and server (#1766)
- Change websockets and the POST end point to send data unbuffered.
- Update tests to handle partial frames
2018-03-29 10:03:59 -07:00
James Newton-King 7f86b92f7e
Handshake and negotiation optimization (#1731) 2018-03-29 17:50:45 +13:00
Mikael Mengistu eb2fa9bacd
Fix more flaky tests (#1750) 2018-03-28 15:27:40 -07:00
James Newton-King 8c84518ecc
Message writing optimization (#1683) 2018-03-29 11:03:40 +13:00
Mikael Mengistu 890c8566d6
Fix WebSocketsSupportedConditionAttribute version check (#1751) 2018-03-28 14:56:03 -07:00
David Fowler 19b9dca268
Change IHubProtocol interface to support partial parsing (#1745)
- These are the finishing touches before we disable batching on the
C# client and on the server. We're changing the IHubProtocol interface to
modify the input buffer with what was consumed. We're also changing it
to parse a single message at a time to be match what output writing does.
- Added TryParseResponseMessage and made it look like TryParseRequestMessage
2018-03-28 12:08:16 -07:00
Mikael Mengistu c631b87c6d
Check for Websockets to fix flaky tests (#1740) 2018-03-28 00:49:37 -07:00
Andrew Stanton-Nurse cfaa123eb8 IConnection refactoring (#1718)
- IConnection is now single-use and HubConnection creates a new instance
for reconnecting
- IConnection is just a Pipe now, no more events
2018-03-27 23:02:07 -07:00
Mikael Mengistu 5b85e8309e
Adding File Header (#1741) 2018-03-27 21:54:11 -07:00
David Fowler 185453908f
Remove HubConnectionContext parameter from IHubProtocolResolver (#1735) 2018-03-27 10:25:00 -07:00
David Fowler 7a9160f3e0
React to https://github.com/aspnet/KestrelHttpServer/pull/2428 (#1734) 2018-03-27 02:02:29 -07:00
James Newton-King 79b51ad642
Added logging of .NET client HTTP requests (#1723) 2018-03-27 12:57:13 +13:00
David Fowler b8285b8356
Don't create the span on netstandard (#1721)
- Directly pin the char[]
- Changed Utf8BufferTextReader to use the Utf8Decoder
- It copies whatever it can into the char buffer allocated in a stateful way (it's more efficient).
- Added tests for unicode and ascii reading
- Added a thread static cache
2018-03-26 14:36:08 -07:00
James Newton-King 4f5bc7046e
Add conditional test attribute for WebSockets (#1709) 2018-03-25 18:53:49 +13:00
David Fowler cb05ce4e0b
Progress towards deleting Sockets.Abstractions (#1705)
* Progress towards deleting Sockets.Abstractions
- Moved our custom DefaultConnectionContext to Sockets.Http and renamed it to HttpConnectionContext.
- Renamed ConnectionManager to HttpConnectionManager
- Use DefaultConnection in tests and benchmarks
- Delete ConnectionMetadata
2018-03-24 04:21:47 -07:00
David Fowler 2e63e5afe3
The rename games part 1 of many (#1696)
- React to rename of EndPoint to ConnectionHandler
- Rename UseSockets to UseConnections
- Rename MapEndPoint to MapConnectionHandler
- Rename HttpSocketOptions to HttpConnectionOptions
2018-03-22 22:35:55 -07:00
BrennanConroy a47e1051e8
Add protocol version to handshake (#1666) 2018-03-22 15:54:35 -07:00
David Fowler f1a3775247
Copy HttpContext properties for long polling transport (#1684)
- The long polling transport simulates a persistent connection
over multiple http requests. In order to expose common http request
properties, we need to copy them to a fake http context on the first poll
and set that as the HttpContext exposed via the IHttpContextFeature.
2018-03-22 15:24:35 -07:00
Mikael Mengistu b5c46f35b3
Check for actual start in SSE (#1681) 2018-03-22 19:03:48 +00:00
James Newton-King 3f84eee116
Detect availability of web sockets on client and server (#1682) 2018-03-22 12:35:31 +13:00
David Fowler 6053a34cf3
Don't expose HubConnectionContext on the Hub (#1674)
- Made HubCallerContext an abstract class
- Made DefaultHubCallerContext that gets data from the HubConnectionContext.
- Removed IP address
- Removed Connection property
2018-03-21 10:07:41 -07:00
BrennanConroy e889175c0e
Properly wait for process exit for docker helper and log errors (#1667) 2018-03-21 09:21:33 -07:00
David Fowler 6583e5fb47
Improved allocations and throughput for broadcast scenarios (#1660)
- Don't allocate when enumerating connections
- Don't allocate tasks unless we truly go async
- Don't get the timestamp, just write the pings always (if there's no ongoing write)
- Track the time since last keep alive write instead of the last write
- ValueTask all the things!
- Renamed HubConnectionList to HubConnectionStore
2018-03-21 09:03:36 -07:00
David Fowler 885679c8bd
Made HubEndPoint derive from EndPoint (#1658)
* Made HubEndPoint derive from EndPoint
2018-03-20 08:31:35 -07:00
James Newton-King 4f10560087
Rename negotiate to handshake, add handshake response, add close frame (#1591) 2018-03-20 17:40:22 +13:00
David Fowler b792fcb4ef
Reduce the per message read allocations (#1635)
- Introduced Utf8BufferTextReader that writes buffers directly into
the char[] allocated by JSON.NET when reading via the JsonReader.
- Use IArrayPool implementation over ArrayPool<char> when reading
incomming messages.
- Replaced JToken parsing with manual parsing using JsonTextReader.
- Added tests for parsing incoming JSON messages with out of order
properties.
- Make access to message headers lazy
- Changed IHubProtocol.TryParseMessage to be ReadOnlyMemory<byte> instead of ReadOnlySpan<byte>
2018-03-18 15:16:03 -07:00
BrennanConroy db0dc0f960
Ignore writeasync failures when sending to multiple connections (#1589) 2018-03-16 16:48:05 -07:00
BrennanConroy 0e38ee3e63
Create connectionIds using RNGCrypto (#1606) 2018-03-16 16:16:34 -07:00
James Newton-King 2d6077db4a
Removed params from proxy's SendAsync and rename to SendCoreAsync (#1605) 2018-03-16 14:05:22 +13:00
David Fowler d27844dfef
ConnectionMetadata is now ConnectionItems (#1604)
* ConnectionMetadata is now ConnectionItems
2018-03-14 20:57:40 -07:00
Andrew Stanton-Nurse 2b68db873a
add AddRedis overload that takes connection string (#1588) 2018-03-14 16:24:28 -07:00
David Fowler 6a8ede0770
Further making Microsoft.AspNetCore.Sockets "not a thing" (#1599)
- This PR attempts to move things where they are needed instead of where they
happened to be used. As a result we should now have Sockets.Abstractions and
Sockets down to the minimal set of things required to make them run.
Sockets.Abstractions should go away in favor of Protocol.Abstractions and
Sockets contains the EndPoint abstraction and related types.
- Moved ConnectionManager and friends to
Sockets.Http.
-Removed Sockets and moved everything into Sockets.Abstractions.
- Moved DefaultConnection and put it in Sockets.Abstractions.
2018-03-14 15:37:24 -07:00
David Fowler dc0567690d
Use features from Protocol.Abstractions (#1594)
- This is part of the grand unification of the connection layer between SignalR and Kestrel
2018-03-14 08:17:07 -07:00
BrennanConroy 62956530ae
Rename StreamAsync to StreamAsChannelAsync (#1587) 2018-03-13 15:04:11 -07:00
Andrew Stanton-Nurse fb6121399c
Remove support for binary over SSE and add transfer format to negotiation (#1564) 2018-03-13 14:29:32 -07:00