BrennanConroy
90aa48c09f
Merge pull request #1798 from aspnet/release/2.1
...
Use IBufferWriter in IHubProtocol (#1791 )
2018-03-30 17:30:30 -07:00
BrennanConroy
903a9ea6a0
Use IBufferWriter in IHubProtocol ( #1791 )
2018-03-30 17:30:08 -07:00
David Fowler
0293e53e11
Handle uninitialized connections in disposal ( #1786 ) ( #1794 )
...
- 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:51:48 -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
a92b3a7288
Merge branch 'release/2.1' into dev
2018-03-30 15:26:44 -07:00
Andrew Stanton-Nurse
6b3a27e73c
Bedrock Renames ( #1777 )
2018-03-30 15:09:19 -07:00
James Newton-King
569fb79776
Merge pull request #1789 from aspnet/release/2.1
...
Re-enable ConnectionCanSendAndReceiveMessages + logging (#1778 )
2018-03-31 08:46:32 +13:00
James Newton-King
0362905a70
Re-enable ConnectionCanSendAndReceiveMessages + logging ( #1778 )
2018-03-31 08:45:33 +13:00
BrennanConroy
ec66d236ac
Merge pull request #1785 from aspnet/release/2.1
...
Add detailed error option (#1763 )
2018-03-30 11:30:44 -07:00
BrennanConroy
44b667b3e6
Add detailed error option ( #1763 )
2018-03-30 11:30:07 -07:00
David Fowler
c29c1b3ec6
Merge pull request #1783 from aspnet/release/2.1
...
Release/2.1
2018-03-30 02:33:28 -07:00
David Fowler
b5a2fcb96a
Dispose the http client in DisposeAsync ( #1780 )
...
- This layer of the stack is no longer reusable and
this disposable was removed (I assume by mistake) in the big refactoring
2018-03-30 01:57:14 -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
5cfc03ffe9
Merge pull request #1775 from aspnet/release/2.1
...
Fix internal HubConnection state when handshake fails (#1774 )
2018-03-29 16:35:55 -07:00
BrennanConroy
46f27cdd0b
Fix internal HubConnection state when handshake fails ( #1774 )
2018-03-29 16:35:31 -07:00
David Fowler
80b842e987
Merge branch 'release/2.1' into dev
2018-03-29 10:05:30 -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
2f9942e1f2
Merge pull request #1765 from aspnet/release/2.1
...
Make HubConnection write messages directly to the PipeWriter (#1762 )
2018-03-29 20:27:14 +13:00
James Newton-King
cddf46c0cd
Make HubConnection write messages directly to the PipeWriter ( #1762 )
2018-03-29 20:26:09 +13:00
James Newton-King
a4dd4da7a2
Merge pull request #1760 from aspnet/release/2.1
...
Handshake and negotiation optimization (#1731 )
2018-03-29 17:51:40 +13:00
James Newton-King
7f86b92f7e
Handshake and negotiation optimization ( #1731 )
2018-03-29 17:50:45 +13:00
Mikael Mengistu
2bf962d362
Merge pull request #1757 from aspnet/release/2.1
...
Always flush in WebSocketsTransport (#1756 )
2018-03-28 18:12:31 -07:00
BrennanConroy
d5dafae2cc
Always flush in WebSocketsTransport ( #1756 )
2018-03-28 18:03:48 -07:00
James Newton-King
6de4ac2880
Merge pull request #1754 from aspnet/release/2.1
...
Message writing optimization (#1683 )
2018-03-29 11:08:13 +13:00
James Newton-King
8c84518ecc
Message writing optimization ( #1683 )
2018-03-29 11:03:40 +13:00
David Fowler
db3441cf93
Merged release/2.1
2018-03-28 14:10:45 -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
David Fowler
4c6c0aa8a4
Merge branch 'release/2.1' into dev
2018-03-27 23:12:00 -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
d598a909a2
Merge branch 'release/2.1' into dev
2018-03-27 10:26:57 -07:00
David Fowler
185453908f
Remove HubConnectionContext parameter from IHubProtocolResolver ( #1735 )
2018-03-27 10:25:00 -07:00
David Fowler
dcd773d10d
Merged release/2.1
2018-03-27 03:03:10 -07:00
David Fowler
7a9160f3e0
React to https://github.com/aspnet/KestrelHttpServer/pull/2428 ( #1734 )
2018-03-27 02:02:29 -07:00
David Fowler
434147fe8e
Merge branch 'release/2.1' into dev
2018-03-27 00:00:13 -07:00
David Fowler
b78e70fadb
Use more pooled Utf8BufferTextReaders ( #1728 )
...
- Use it in the HandshakeProtocol
- Move CreateJsonTextReader to JsonUtils
2018-03-26 23:32:43 -07:00
unknown
678265259d
Merge remote-tracking branch 'origin/release/2.1' into dev
2018-03-26 17:30:38 -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
David Fowler
65204ec6f2
Small changes ( #1714 )
...
- Don't allocate for empty arrays.
- Don't allocate the list of pre-serialized messages until writing
2018-03-25 12:38:51 -07:00
Damir Ainullin
dd9369ece8
Removed excessive null check because string.Join can't return null ( #1716 )
2018-03-25 10:13:07 -07: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
David Fowler
b111c91cb0
Don't copy the array for incoming msgpack reads ( #1686 )
...
* Don't copy the array for incoming msgpack reads
- Don't use ToArray on the already sliced msgpack data.
- Turns out msgpack is self describing enough to not require the count, it just needs the buffer and start offset.
2018-03-22 08:47:06 -07: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
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
cf7c8629ff
Use ActivatorUtlities.CreateFactory instead of CreateInstance ( #1643 )
...
* Use ActivatorUtlities.CreateFactory instead of CreateInstance
- Turns out CreateFactory is much much faster
- Added a benchmark for hub activation
2018-03-19 00:19:54 -07:00
David Fowler
d4d5a08bc2
The payload property was never used ( #1641 )
2018-03-18 22:34:02 -07:00
David Fowler
7df5c87815
Add copyright headers to new files
2018-03-18 15:39:20 -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
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
David Fowler
079a56be1a
Small optimizations ( #1617 )
...
- Return ValueTask instead of Task from WriteAsync helpers
- Use TryGet instead of foreach to avoid enumerator (though it's just a stack allocation here)
2018-03-16 16:08:11 -07:00
BrennanConroy
c640f422e0
Pascal case formatted log parameter names ( #1615 )
2018-03-16 12:13:27 -07:00
BrennanConroy
9839e6b07b
Perf in MessageParsers ( #1616 )
2018-03-16 11:40:15 -07:00
David Fowler
227c6b8133
Use the array unpacker instead of the Stream unpacker ( #1619 )
...
- This reduces allocations and improves throughout of msgpack
2018-03-16 09:41: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
David Fowler
adb760210d
Minimal reaction to proto abstractions changes ( #1583 )
...
- Doesn't consume new feature interfaces yet.
2018-03-13 10:24:08 -07:00
James Newton-King
974eb28b8b
Hub method reflection caching and invocation benchmarks ( #1574 )
2018-03-13 10:30:45 +13:00
James Newton-King
d816c6ef60
Add additional properties to HttpOptions ( #1557 )
2018-03-13 09:46:34 +13:00
BrennanConroy
489bd80b88
Remove threshold from client SSE pipe ( #1577 )
2018-03-12 12:50:42 -07:00
Mikael Mengistu
0b81658850
Add SignalR Marker Service ( #1573 )
2018-03-10 00:58:57 +00:00
James Newton-King
d6178f2482
Fixed streaming hub method with ValueTask ( #1572 )
2018-03-10 12:31:38 +13:00
BrennanConroy
d941a4be09
Workaround automatic Http2 upgrade in POSTs ( #1571 )
2018-03-09 11:43:59 -08: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
James Newton-King
1c44e8febf
Fix streaming hub methods combined with async ( #1544 )
2018-03-07 20:07:06 +13:00
Mikael Mengistu
1b9313287b
Restrict HubProtocol on Server + HubOptions<THub> ( #1492 )
2018-03-07 01:31:56 +00:00
James Newton-King
846432c9ac
Improve unexpected server error message to client ( #1532 )
...
* Improve unexpected server error message to client
* Separated expected vs unexpected errors in error message. Fixed broken tests
* Fix ts functional tests
2018-03-06 22:11:46 +13:00
BrennanConroy
569c31bc62
Add some more logging ( #1510 )
2018-02-28 14:11:59 -08:00
Pavel Krymets
8908eec6e7
Pipelines in corefx ( #1501 )
2018-02-28 12:42:01 -08:00
Andrew Stanton-Nurse
13b25ec518
Reduce detailed payload logs to trace ( #1515 )
2018-02-28 10:46:44 -08:00
BrennanConroy
1790d6bdf0
Serialize once per format to increase perf in broadcasting scenarios ( #1498 )
2018-02-27 14:55:00 -08:00
BrennanConroy
8594d2b897
Use Threadpool for pipe scheduler ( #1497 )
2018-02-26 14:07:46 -08:00
David Fowler
b60e4cfea6
Removing remnants from the days of OPTIONS ( #1495 )
2018-02-26 14:05:55 -08:00
Mikael Mengistu
0e4731e480
Expose Transport and Application Max Buffer Sizes ( #1473 )
2018-02-25 08:47:14 +00:00
Andrew Stanton-Nurse
6a2d41cc9f
Fix #924 by introducing HubDispatcher abstraction ( #1479 )
2018-02-22 20:59:34 -08:00
David Fowler
32baa655b9
Do over the websocket transport ( #1481 )
...
* Do over the websocket transport
- Unify client and server logic (no code sharing yet)
- Removed use of cancellation tokens to communicate shutdown and instead used the pipe reader and socket abort.
- Added CloseTimeout to HttpOptions
2018-02-22 15:19:25 -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
a2ac9c573e
Added try finally to semaphore release ( #1469 )
2018-02-18 12:37:42 -08:00
David Fowler
e1bb2215e5
Remove the Channel<HubMessage> from the HubConnectionContext ( #1468 )
...
* Remove the Channel<HubMessage> from the HubConnectionContext
- Replace the channel with a single lock around the pipewriter. Since writes are always synchronous, the lock is held for a very short time.
- We were only using them in this scenario for handling multiple producers (the hub output, the keep alive ping and the broadcast).
- Handle the scenario where there's back pressure (when we use pipes that are bounded) and give callers a single task representing when back pressure is released.
- Handle synchronous exceptions in RedisHubLifetimeManager
- Fixed benchmarks
2018-02-17 10:22:11 -08:00
David Fowler
de7faec246
Pass the array segment offset to WriteAsync ( #1467 )
2018-02-17 01:26:07 -08:00
BrennanConroy
3acd29ec6f
Revert "Fix flaky SSE test ( #1279 )"
...
This reverts commit 6fcf554c23 .
2018-02-16 19:01:54 -08:00
BrennanConroy
a513386f68
Somehow the token didn't get passed into the reader ( #1465 )
2018-02-16 16:23:15 -08:00
BrennanConroy
6fcf554c23
Fix flaky SSE test ( #1279 )
2018-02-15 09:56:02 -08:00
Dona278
551158c239
Fixed exception during deserialization of a message with Redis ( #1426 )
...
Changed wrong message type used during deserialization in "SubscribeToUser"
2018-02-14 11:30:32 -08:00
BrennanConroy
d9b32ee323
Logging invocations with errors would throw inside logger ( #1445 )
2018-02-13 14:57:21 -08:00
David Fowler
ae998ba172
Remove unneeded dependencies ( #1443 )
2018-02-12 23:58:44 -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
3934ffd5af
Cleanup some dead code ( #1434 )
...
- Rename SocketBuilder to ConnectionBuilder
- Removed ChannelReaderExtensions
2018-02-10 22:16:30 -08:00
David Fowler
4c08acd8a4
Don't allocate all the memory up front when receiving incoming sends ( #1433 )
2018-02-10 20:52:00 -08:00
David Fowler
94155b0e89
Use protocol.abstractions primitives instead of socket abstractions ( #1432 )
2018-02-10 18:10:09 -08:00
David Fowler
342c4c44f6
Change namespace to avoid conflict
2018-02-10 12:44:55 -08:00
David Fowler
3e568588d2
Revert "Use protocol.abstractions primitives instead of socket abstractions ( #1429 )" ( #1431 )
...
This reverts commit e3f197cef0 .
2018-02-10 11:30:41 -08:00
David Fowler
e3f197cef0
Use protocol.abstractions primitives instead of socket abstractions ( #1429 )
2018-02-10 10:45:07 -08:00
David Fowler
2ed78d5762
Don't expose Channel from HubConnectionContext ( #1428 )
...
- Change HubEndPoint to call WriteAsync
- Fixed assert for protocol reader writer
2018-02-09 22:00:28 -08:00
David Fowler
28439d1441
Initial changes to move to pipelines ( #1424 )
...
- Change the Sockets abstraction from Channel<byte[]> to pipelines.
#615
2018-02-09 17:45:21 -08:00
Andrew Stanton-Nurse
0435b6dc6e
add headers and revamp msgpack tests ( #1382 )
2018-02-07 09:36:29 -08:00
Andrew Stanton-Nurse
b61dc35ee6
fix #1199 by suppressing ODE in received callback ( #1395 )
2018-02-01 15:08:52 -08:00
BrennanConroy
8cecca07a2
Fix race in Restart during Close task ( #1263 )
2018-01-31 15:51:33 -08:00
Pavel Krymets
9482b4976e
Merget release/2.1
2018-01-30 09:48:13 -08:00
Mikael Mengistu
e214d5cdfa
Reduce LongPolling timeout to accommodate Cloudflare's timeout ( #1368 )
...
* Reduce LongPolling timeout to accommodate Cloudflare's timeout
2018-01-29 23:55:08 -08:00
Pavel Krymets
ac9db5dc7b
React to pipeline changes ( #1365 )
2018-01-29 14:36:03 -08:00
BrennanConroy
96a3a03de8
Fix incorrect content-type ( #1347 )
2018-01-25 10:38:27 -08:00
BrennanConroy
67c76287ed
Return stream method error to client ( #1331 )
...
* Return correct error to client from failing stream method
2018-01-24 09:08:27 -08:00
Mikael Mengistu
40e906f23a
Expose IHttpConnectionFeature properties ( #1338 )
2018-01-23 18:25:53 -08:00
BrennanConroy
b088eaa91f
Rename JwtBearer to AccessToken in C# Client ( #1333 )
2018-01-22 16:05:51 -08:00
BrennanConroy
a449345436
Clean up logging ( #1308 )
2018-01-22 09:37:53 -08:00
BrennanConroy
d38764a8f0
Rename InvokeAsync to SendAsync on the server ( #1312 )
2018-01-19 11:32:50 -08:00
BrennanConroy
dfe0697f06
EventId starts at 1 for logging ( #1318 )
2018-01-18 16:11:43 -08:00
Pawel Kadluczka
68aa609650
Setting ContentType in the HTTP responses ( #1149 )
...
* Also making auth test work in IE
2018-01-16 11:28:20 -08:00
Andrew Stanton-Nurse
7c635fae56
remove System.IO.Pipelines.Extensions dependency and internalize code ( #1288 )
2018-01-11 14:10: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
a9d643a93e
remove dependency on system.buffers.primitives ( #1287 )
2018-01-11 11:28:08 -08:00
Andrew Stanton-Nurse
144984e599
Split MsgPack into separate assembly ( #1274 )
2018-01-10 14:20:57 -08:00
Mikael Mengistu
89b532c985
Invoke Users ( #1257 )
2018-01-08 17:58:42 -08:00
Mikael Mengistu
8b34b7f2ae
Invoke Multiple Groups ( #1254 )
2018-01-05 13:57:19 -08:00
Mikael Mengistu
e1f9a65083
MultipleClients -> Clients ( #1269 )
2018-01-05 12:07:26 -08:00
Pavel Krymets
8a4adf1cb6
React to pipeline changes ( #1250 )
...
React to pipeline changes
2018-01-04 09:56:39 -08:00
BrennanConroy
d5d159eb5f
Lock around heartbeat handler ( #1264 )
2018-01-03 12:29:25 -08:00
Mikael Mengistu
6baee8b7a9
Refactor HubContext to not Implement IHubClients ( #1262 )
2018-01-02 17:26:10 -08:00
Mikael Mengistu
738617266e
Invoke Multiple Connections ( #1242 )
2017-12-21 15:19:43 -08:00
Andrew Stanton-Nurse
00a6dc983a
Fix #1170 by removing invocationId from non-blocking calls ( #1218 )
2017-12-19 10:40:58 -08:00
Mikael Mengistu
c8bd72be36
Others in Group ( #1230 )
2017-12-18 15:27:56 -08:00
Mikael Mengistu
eb2668e74e
AllExcept for Groups - GroupExcept ( #1204 )
2017-12-15 17:34:08 -08:00
Geovanny Alzate Sandoval
31ef3c49df
Makes MapHub and MapEndpoint consistent with other ASP.NET Core APIs using PathString. #1188
2017-12-13 09:14:36 -08:00
BrennanConroy
588d9cdb11
Use Utf8Parser instead of custom code ( #1200 )
2017-12-12 11:55:48 -08:00
Pawel Kadluczka
66ab939cff
Making HttpConnection restartable (C#) ( #1147 )
...
🎉
2017-12-12 10:08:42 -08:00
Mikael Mengistu
75e102f97a
Support for Others and Caller Client Subsets( #1192 )
2017-12-11 17:30:53 -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
6e152e24e1
forgot a copyright header ( #1183 )
2017-12-05 16:51:24 -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
Andrew Stanton-Nurse
3005337a9c
fix #625 by implementing HubMethodNameAttribute ( #1173 )
2017-12-01 09:48:26 -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
Pranav K
887e22ec07
Eclipse S.T.Tasks.Extension version referenced by S.T.Channels
2017-11-22 19:53:01 -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
Pawel Kadluczka
046553cfe4
Avoiding serializing to MemoryStream
2017-11-17 15:02:21 -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
5d8aa1ee2a
Fix a couple flaky tests ( #1116 )
2017-11-14 14:44:15 -08:00
BrennanConroy
9789e09cfb
Adding EventSource/EventCounters to Sockets ( #1083 )
2017-11-14 09:04:35 -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
BrennanConroy
9371e7b50a
[Redis] Reorder some code to make it less spaghetti ( #1081 )
2017-11-02 18:38:20 -07:00
Pawel Kadluczka
cc42b0eaef
Fixing a bug where cancellation could result in HubException
...
When the client cancels a streaming method the server would send an error completion. This was not correct because cancellation is not an error. We did not see this because our client ignores any messages for a given streaming invocation after sending a CancelInvokationMessage but other clients may want to drain messages before considering a streaming method canceled.
2017-11-01 20:20:43 -07:00
BrennanConroy
8c446fc02d
[Redis] Save a few bytes for acks ( #1070 )
2017-11-01 16:48:36 -07:00
Nate McMaster
e15a38a14c
Pin package and tool versions to make build more repeatable
2017-11-01 16:40:51 -07:00
BrennanConroy
2419867dfc
Handle errors in Redis subscription callbacks ( #1069 )
2017-11-01 10:29:02 -07:00
BrennanConroy
83bb07d5a4
Fix parameter name ( #1066 )
2017-10-30 12:55:12 -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
BrennanConroy
30e7422407
Enable reconnect for Redis connection by default ( #1037 )
2017-10-24 14:30:13 -07:00
Mikael Mengistu
1768a081ba
Updating default pattern( #1046 )
2017-10-23 22:20:31 -07:00
Pawel Kadluczka
caff492cdc
Removing sending OPTIONS request if WebSocket transport requested ( #1036 )
...
Removing sending OPTIONS request if WebSocket transport requested
This removes session stickiness requirement for WebSockets
Fixes : #1035
2017-10-23 10:28:33 -07:00
BrennanConroy
9cc5d13a40
[Redis] Adding same group to connection multiple times should NOP ( #1040 )
...
* Added some additional tests too
2017-10-20 14:29:08 -07:00
Pawel Kadluczka
8d1d6d0300
Adding StreamCompletion message (C#)
2017-10-19 18:20:03 -07:00
Mikael Mengistu
04d4da2987
Replace Received Event with OnReceived ( #1006 )
2017-10-18 17:10:51 -07:00
BrennanConroy
bb308ff72e
LoggerDefine for Redis ( #1002 )
2017-10-18 10:46:03 -07:00
Gurgen Hakobyan
b3ac9f4bf8
Not very important code optimization ( #1030 )
...
Code optimization
2017-10-18 09:23:32 -07:00
BrennanConroy
0e70c7950b
Adding Redis Unit tests ( #1013 )
2017-10-17 15:48:29 -07:00
BrennanConroy
878a70226c
[Redis] Remove groups properly from connection diconnection ( #1010 )
...
And properly short circuit group actions for local connections
2017-10-17 14:15:00 -07:00
gurgen
af286c81bb
Groups collection without lock
2017-10-17 12:06:05 -07:00
BrennanConroy
de34990241
Short Circuit message to local connection in Redis ( #1009 )
2017-10-11 13:17:49 -07:00
BrennanConroy
8701baf73d
Add negotiate timeout option to hub options ( #1003 )
2017-10-11 08:59:37 -07:00
BrennanConroy
de2e0967c3
Adding CancelInvocation message ( #979 )
...
* For Streaming only. And C# client only.
2017-10-06 15:55:39 -07:00
ivankarpey
665f166d67
fix issue with incorrect user detection when Invoking for User ( #747 )
...
* fix issue with incorrect user detection when Invoking for User
* fix failed testcases
* use proper extension method to avoid potential null reference exception
* fix for channel name in redis version + follow SignalR team recommendations
* remove unncessary freespace
* remove whitespaces
* introduce IUserIdProvider to resolve user id
* Move IUserIdProvider from HubLifetimeManager to HubConnectionContext
* setting user id to connection context in hubendpoint
2017-10-06 11:58:18 -07:00
Kai Ruhnau
3c5d283689
Fix the VarInt example for the 2GiB
...
`0x7fffffff` has 31 binary ones. The first four bytes of the VarInt account for 4*7=28, so the fifth byte only needs the remaining three
2017-10-06 10:38:21 -07:00
Mikael Mengistu
72514f3943
Removing the connected event ( #989 )
2017-10-05 11:12:18 -07:00
Pawel Kadluczka
7c90e80b3f
Merge branch 'rel/1.0.0-alpha2' into dev
2017-10-02 10:07:16 -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
05da66ada0
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-28 17:52:25 -07:00
Pawel Kadluczka
4f4fb174ea
Replacing 8-byte-long length prefix with varint
2017-09-28 17:00:49 -07:00
David Fowler
2adf24d1c6
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-25 23:44:25 -07:00
David Fowler
e17cdae046
Added overloads from 0-n arguments ( #949 )
...
- Added 0 arg overload for InvokeAsync
2017-09-25 23:42:05 -07:00
David Fowler
9df8d2f795
Remove the params argument from IClientProxy ( #946 )
...
* Remove the params argument from IClientProxy
- This allows passing arrays without having to explicitly ToArray() or AsEnumerable()
- Added overloads up to 10 arguments
- Added tests
2017-09-25 21:01:52 -07:00
David Fowler
000f9cb192
Initial support for websocket subprotocols ( #933 )
...
* Initial support for websocket subprotocols
- Exposes a SubProtocol property on WebSocketOptions that picks the
protocol for all connections on the end point.
- This is required for things like mqtt over websockets (the SubProtocol in
this case is something like mqtt or mqttv3.1)
- Added test
#402
2017-09-25 15:17:45 -07:00
David Fowler
5497c7d4ce
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-25 08:31:02 -07:00
David Fowler
26255cc29c
Check for null before sending to a specific connection id ( #935 )
...
* Check for null before sending to a specific connection id
- Added some tests for the DefaultHubLifetimeManager
#905
2017-09-25 08:26:24 -07:00
moozzyk
c0713c9916
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-25 08:17:27 -07:00
Pawel Kadluczka
0267695656
Exceptions thrown during writing should close the connection
...
We need to close the connection if there is an exception when writing to the transport on the server side. Currently if an exception happens it leaves the connection in an unsable state - after the exception no messages from the server will be sent to the client because the writing loop is terminated. Ignoring the message could cause hangs on the client side since we can fail while writing a completion message. In this case if the client is awaiting the invocation it will hang because the task will never be completed.
2017-09-25 08:13:46 -07:00
David Fowler
65cd41dbf5
Block POST requests for websocket connections ( #934 )
2017-09-23 17:49:19 -07:00
Pawel Kadluczka
8743723ece
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-21 23:00:20 -07:00
Pawel Kadluczka
4db78685dc
camelCasing objects serialized by JsonHubProtocol
...
Fixes : #859
2017-09-21 22:58:59 -07:00
Pawel Kadluczka
6ed3f6d1aa
Enabling hub connection with customized hub protocols
2017-09-21 22:57:07 -07:00
Andrew Stanton-Nurse
786980bc3f
add names to EventIds used by logger extensions ( #927 )
2017-09-21 17:36:50 -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
Tim Seaward
bcda95353e
Remove extra span ( #922 )
2017-09-21 03:30:05 -07:00
Tim Seaward
f71e31a1cd
Fix the double buffer rent/free ( #921 )
...
* Fix the double buffer rent/free
* Fix the double cast to span
2017-09-20 23:30:59 -07:00
Pawel Kadluczka
dd07ab1735
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-20 15:31:56 -07:00
BrennanConroy
4e9a7be7dd
SignalR Core Logging ( #889 )
2017-09-20 15:13:26 -07:00
FTWinston
a7fb243501
Added typed HubContext
2017-09-19 16:16:31 -07:00
David Fowler
24455da8fb
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-18 20:46:14 -07:00
Pawel Kadluczka
8c9016cfbd
Removing AspNetCoreVersion for a package reference
2017-09-18 17:26:02 -07:00
David Fowler
48d97bf271
Turned Stream into StreamAsync ( #902 )
...
* Turned Stream into StreamAsync
- Before we were fire and forgetting the invocation that initiated
the streaming, this changes that so that the caller now has to await
to get the channel.
#899
2017-09-18 16:44:18 -07:00
David Fowler
2efbd6a95a
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-18 14:14:23 -07:00
David Fowler
a93e4be82f
Added Cancellation support ( #897 )
...
* Added Cancellation support
- Added ConnectionAbortedToken to the HubConnectionContext. This allows
arbitrary code to access a handle that represents the connection lifetime
without handling OnDisconnectedAsync on the hub itself.
- Expose Abort on HubConnectionContext to allow server side methods to
abort the connection.
- Use the Abort to stop the main loop when unexpected invocation errors happen.
- Use the connection aborted token as unsubscribe from the IObservable and to complete
the IAsyncEnumerator for streaming results.
2017-09-18 12:47:38 -07:00
BrennanConroy
0159d45f54
Merge branch 'rel/1.0.0-alpha2' into dev
2017-09-15 11:05:04 -07:00
BrennanConroy
9a67ac5341
Make sure socket closed is logged
2017-09-15 11:03:51 -07:00
Pawel Kadluczka
b093f2b279
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-13 13:55:06 -07:00
Pawel Kadluczka
d226b20756
Rename With/GetTransportType to With/GetTransport
2017-09-13 09:46:17 -07:00
David Fowler
11cc57ee0e
Merge branch 'rel/1.0.0-alpha1' into dev
...
# Conflicts:
# src/Microsoft.AspNetCore.SignalR.Client.Core/Microsoft.AspNetCore.SignalR.Client.Core.csproj
2017-09-13 09:20:53 -07:00
David Fowler
2e695c935e
Made tweaks to .NET client logging API ( #869 )
...
- Removed ConnectionFactoryDelegate and used Func<IConnection>
- Changed WithLogger that accepts ILoggerFactory to WithLoggerFactory
- Made UseLogger configure the existing ILoggerFactory or create a LoggerFactory
- Add support for setting the log level for console logs
- Updated tests
2017-09-13 09:18:06 -07:00
Pawel Kadluczka
5d7b706c4d
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-13 09:15:08 -07:00
Pawel Kadluczka
dbe4b4025b
Merge branch 'pawelka/msgpack-fixes' into rel/1.0.0-alpha1
2017-09-13 09:14:16 -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
BrennanConroy
30f16fcf4b
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-12 13:45:56 -07:00
BrennanConroy
2d4b2239a9
Reduce C# client logging and add HubProtocol log ( #857 )
2017-09-12 13:45:11 -07:00
Pawel Kadluczka
240c09034e
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-12 13:08:15 -07:00
Pawel Kadluczka
35683fb2b8
Fixing a bug where adding protocol with build would have no effect
2017-09-12 13:06:38 -07:00
BrennanConroy
ef4da90c91
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-11 16:55:57 -07:00
BrennanConroy
393ab6a4f0
Add extension method to get HttpContext on HubConnectionContext ( #849 )
2017-09-11 16:55:32 -07:00
Pawel Kadluczka
eec4b33cff
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-07 14:25:43 -07:00
Pawel Kadluczka
62bbe943e8
Make sure long polling transport can survive http client timeout
2017-09-07 14:14:52 -07:00
Pawel Kadluczka
225d2ed6f1
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-07 10:30:31 -07:00
Pawel Kadluczka
4ac8e786cf
Adding HubConnectionBuilder
2017-09-07 10:04:42 -07:00
Pawel Kadluczka
8ff6a4b624
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-07 09:52:28 -07:00
Pawel Kadluczka
9e614b6cc7
Initializing HubOptions.JsonSerializationSettings to default settings
2017-09-07 09:51:20 -07:00
Pawel Kadluczka
269e1d1b5e
Merge branch 'rel/1.0.0-alpha1' into dev
2017-09-05 12:22:49 -07:00
Pawel Kadluczka
ceff4bd7da
Exceptions from user's event handlers should be caught and logged
...
Otherwise they can spoil event queue and make the client not raise the Received event anymore
Fixes : #818
2017-09-05 12:21:47 -07:00
Nate McMaster
d3ae3abe2a
Use PackageLineup to manage PackageReference versions
2017-09-01 16:34:32 -07:00
Mikael Mengistu
8ec2848646
AllExcept for Dynamic and Typed Hubs ( #796 )
2017-08-31 15:30:19 -07:00
Pawel Kadluczka
5dceaa8149
Adding Microsoft.AspNetCore.SignalR.Client
2017-08-31 10:10:02 -07:00
Pawel Kadluczka
36acebf9fb
Renaming Microsoft.AspNetCore.SignalR.Client to Microsoft.AspNetCore.SignalR.Client.Core
2017-08-31 10:10:02 -07:00
Pawel Kadluczka
521eed1438
Renaming Microsoft.AspNetCore.SignalR.Http to Microsoft.AspNetCore.SignalR
2017-08-31 10:10:02 -07:00
Pawel Kadluczka
fa1f7f0b13
Renaming Microsoft.AspNetCore.SignalR to Microsoft.AspNetCore.SignalR.Core
2017-08-31 10:10:02 -07:00
BrennanConroy
b8d2d24b67
Log connection resets as trace not error ( #799 )
2017-08-30 14:57:26 -07:00
BrennanConroy
5ff5c38325
Add Group Add and Remove acks ( #780 )
2017-08-30 14:07:23 -07:00
Nate McMaster
9c0dc52d67
Use Directory.Build.props/targets
2017-08-29 10:17:20 -07:00
Mikael Mengistu
b60e598277
Setting the User-Agent header ( #759 )
2017-08-27 16:35:28 -07:00
Mikael Mengistu
a200cd46b1
Use ForceAsyncAwaiter to make sure we're not on the app SyncContext ( #758 )
2017-08-25 14:02:17 -07:00
Pawel Kadluczka
bcd5a1bd6e
Filtering out SSE tests for browsers with no EventSource
2017-08-24 15:33:24 -07:00
BrennanConroy
a702713cd4
SignalR C# Client logging ( #752 )
2017-08-24 08:37:05 -07:00
BrennanConroy
b8a936f2c1
Use IApplicationLifetime instead of IHostedService ( #757 )
2017-08-24 00:10:18 -07:00
BrennanConroy
978f5cebc0
Starting HubOptions ( #743 )
...
* Added JsonSerializerSettings
2017-08-23 15:30:08 -07:00