Commit Graph

115 Commits

Author SHA1 Message Date
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
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