Commit Graph

72 Commits

Author SHA1 Message Date
Andrew Stanton-Nurse 499d39b364
rename MsgPack assembly only (#2005) 2018-04-13 12:01:45 -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 c83baf2b76
Remove params from message ctors (#1931) 2018-04-11 12:11:13 +12:00
Ben Adams 8a3516284e Add GetMessageBytes to IHubProtocol (#1915) 2018-04-10 07:14:09 -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 0f663cadc4
readonly all the things (#1901) 2018-04-08 15:47:01 +12:00
James Newton-King acc0b7ad0d
Serialize NegotiateResponse with IBufferWriter (#1881) 2018-04-07 15:50:13 +12:00
David Fowler 61c3d0c403
Added Microsoft.AspNetCore.SignalR.Protocols.Json (#1861)
- Fixed package descriptions
- Call AddJsonProtocol from both the SignalR.Core (client and server)
2018-04-05 01:32:10 -07:00
James Newton-King f7fc2647de
var all the things (#1855) 2018-04-05 18:41:13 +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
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
Andrew Stanton-Nurse 6b3a27e73c
Bedrock Renames (#1777) 2018-03-30 15:09:19 -07:00
James Newton-King 7f86b92f7e
Handshake and negotiation optimization (#1731) 2018-03-29 17:50:45 +13: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
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
BrennanConroy a47e1051e8
Add protocol version to handshake (#1666) 2018-03-22 15:54: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
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
Pavel Krymets 4a4efe0f39
Update to new corefx (#1561) 2018-03-08 14:23:20 -08:00
Andrew Stanton-Nurse 6a2d41cc9f
Fix #924 by introducing HubDispatcher abstraction (#1479) 2018-02-22 20:59:34 -08:00
Andrew Stanton-Nurse b3a33efeae Update MsgPack-Cli version
* Fixes #1301
* Fixes #1058
* Fixes #1422
2018-02-20 13:57:42 -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
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
Andrew Stanton-Nurse 0435b6dc6e
add headers and revamp msgpack tests (#1382) 2018-02-07 09:36:29 -08:00
Josh Williams 0311f9b415 Throw InvalidDataException instead of FormatException in NegotationProtocol (#1246)
* Throw InvalidDataException instead of FormatException in NegotationProtocol
 - Modify NegotiationProtocol to throw InvalidDataException
 - Update NegotiationProtocolTests expectations
 - Remove test case for InlineData "Missing required property 'protocol'"
 - Update JsonHubProtocol & JsonUtils to throw InvalidDataException
 - Update corresponding test expectations
 - Add back removed test

Addresses #1203
2018-01-11 13:23:30 -08:00
Andrew Stanton-Nurse 144984e599
Split MsgPack into separate assembly (#1274) 2018-01-10 14:20:57 -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 c1d2024864
Implement #1156 by having the server send Ping messages (#1161) 2017-12-04 14:43:27 -08:00
BrennanConroy 531c7cfba1
More micro benchmarks (#1158)
- Hub Protocol benchmark
- Broadcast benchmark
- Run benchmarks validation during builds
2017-11-28 15:39:58 -08:00
Pawel Kadluczka 046553cfe4 Avoiding serializing to MemoryStream 2017-11-17 15:02:21 -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
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
Pawel Kadluczka 8d1d6d0300 Adding StreamCompletion message (C#) 2017-10-19 18:20:03 -07:00
Pawel Kadluczka a903a74db1 Adding roundtripping test for CancelInvocation message (#1031)
* Adding roundtripping test for CancelInvocation message
2017-10-18 22:49:15 -07:00
BrennanConroy de2e0967c3 Adding CancelInvocation message (#979)
* For Streaming only. And C# client only.
2017-10-06 15:55:39 -07:00
Pawel Kadluczka 70df19c8a2 Fixing MsgPack serializing byte[] as string Part 1
Enabling sending byte[] from server to client.
2017-09-29 17:05:24 -07:00
Pawel Kadluczka 4f4fb174ea Replacing 8-byte-long length prefix with varint 2017-09-28 17:00:49 -07:00
Pawel Kadluczka 126901a08f Adding default ctors for HubProtocols 2017-09-21 15:30:23 -07:00
Pawel Kadluczka ba25dee141 Enabling customizing serialization settings in MessagePack protocol 2017-09-21 15:30:23 -07:00