Commit Graph

131 Commits

Author SHA1 Message Date
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
James Newton-King f7fc2647de
var all the things (#1855) 2018-04-05 18:41:13 +12:00
BrennanConroy 32b4d5cc6c
Set X-Requested-With on all requests (#1848) 2018-04-04 17:12:50 -07:00
BrennanConroy 80f87e7730
Add Handshake timeout to C# Client (#1840) 2018-04-04 15:54:42 -07:00
James Newton-King e7b84b753b
Refactor HubConnectionBuilder (#1830) 2018-04-04 21:19:13 +12:00
Mikael Mengistu 7c2d9e87e9
Clean up pipe pair on transport start failure (#1836) 2018-04-03 17:08:04 -07:00
Mikael Mengistu ba0131a731
Rename TransportTypes to HttpTransportTypes (#1839) 2018-04-03 16:00:20 -07:00
BrennanConroy 5ce672dfe6
ThreadStatic MemoryBufferWriter (#1821) 2018-04-02 11:25:04 -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
BrennanConroy 903a9ea6a0
Use IBufferWriter in IHubProtocol (#1791) 2018-03-30 17:30:08 -07:00
Andrew Stanton-Nurse 6b3a27e73c
Bedrock Renames (#1777) 2018-03-30 15:09:19 -07:00
Mikael Mengistu 313133131f
Check for Websockets in Fallback functional tests (#1772) 2018-03-30 12:33:42 -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
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
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 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
Mikael Mengistu b5c46f35b3
Check for actual start in SSE (#1681) 2018-03-22 19:03:48 +00: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
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
James Newton-King d816c6ef60
Add additional properties to HttpOptions (#1557) 2018-03-13 09:46:34 +13:00
Pavel Krymets 4a4efe0f39
Update to new corefx (#1561) 2018-03-08 14:23:20 -08:00
Mikael Mengistu adbd964efd
Transport Fallback (#1455) 2018-03-08 06:49:03 +00:00
James Newton-King a41bf6228f
Client sends user agent with version based on assembly version (#1551) 2018-03-08 10:25:12 +13:00
Pavel Krymets 8908eec6e7
Pipelines in corefx (#1501) 2018-02-28 12:42:01 -08:00
David Fowler c8d4cf689f
Tackling some low hanging performance fruit (#1470)
* Tackling some low hanging performance fruit
- Use native Memory/Span APIs on Stream and WebSocket in .NET Core 2.1
- Remove double copying in formatters
- Implemented custom HttpContent over ReadOnlyBuffer<byte>
2018-02-20 13:50:31 -08:00
BrennanConroy 3acd29ec6f Revert "Fix flaky SSE test (#1279)"
This reverts commit 6fcf554c23.
2018-02-16 19:01:54 -08:00
BrennanConroy 6fcf554c23
Fix flaky SSE test (#1279) 2018-02-15 09:56:02 -08:00
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