Commit Graph

30 Commits

Author SHA1 Message Date
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
BrennanConroy 903a9ea6a0
Use IBufferWriter in IHubProtocol (#1791) 2018-03-30 17:30:08 -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
BrennanConroy a47e1051e8
Add protocol version to handshake (#1666) 2018-03-22 15:54:35 -07: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
Pavel Krymets 4a4efe0f39
Update to new corefx (#1561) 2018-03-08 14:23:20 -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
Andrew Stanton-Nurse 00a6dc983a
Fix #1170 by removing invocationId from non-blocking calls (#1218) 2017-12-19 10:40:58 -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
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 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
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
Pawel Kadluczka 1453f419a8 MessagePack Serialization fixes
* serializing user objects as maps (#863)
* enabling serializing objects that potentially cannot be deserialized (#862)
2017-09-13 08:50:04 -07:00
Pawel Kadluczka e2cec0b305 Adding MsgPack hub protocol to TS client 2017-08-09 09:12:11 -07:00
moozzyk e089852d59 Turning messages to arrays
Makes it much easier to parse in JavaScript (also is more MsgPacky)
2017-08-09 09:12:11 -07:00
moozzyk be9fec5d30 Adding result kind to completion message
Before we would rely on error being null to detect whether to read results and we had an additional 'hasResult' field. Now all this information is codified in a field.
2017-08-09 09:12:11 -07:00
David Fowler 0f4295f90e Make parsers stateless (#628)
* Make parsers stateless
- Changed parser input to ReadOnlySpan<byte> to ReadOnlyBuffer<byte>
2017-07-01 23:44:22 -07:00
David Fowler 6332e98d03 Remove Try from Write methods (#614)
- We write to a Stream so it should never fail (it could throw
but that's not new).
2017-06-28 21:53:23 -07:00
Pawel Kadluczka 71949129ea Enabling length prefixing, parsing multiple messages 2017-06-27 18:08:32 -07:00
Pawel Kadluczka 3504337918 Adding MsgPack HubProtocol 2017-06-27 17:35:00 -07:00