Commit Graph

97 Commits

Author SHA1 Message Date
James Newton-King e7b84b753b
Refactor HubConnectionBuilder (#1830) 2018-04-04 21:19:13 +12:00
BrennanConroy 221c95e0af Couple logging additions (#1827)
- Added logging in a couple more places in HubConnection
- Increase DEFAULT_TIMEOUT_INTERVAL to 20 seconds
2018-04-02 19:25:47 -07:00
BrennanConroy 5ce672dfe6
ThreadStatic MemoryBufferWriter (#1821) 2018-04-02 11:25:04 -07:00
David Fowler e9d58154ec
Added TCP client sample to HubSample (#1805)
- Ripped of Kestrel's SocketConnection to make a TcpConnection
IConnection implementation.
- Fixed issue with SignalR assuming there will always be a non-null user
on the ConnectionContext.
2018-04-02 09:50:50 -07:00
David Fowler dc86690f04
Change default handshake timeout (#1808)
- 5 seconds seems to be too low for long polling's RTT. We often see super flaky tests and it seems like this is the best fix. Ideally, we would do something more sophisitcated than just timeout the entire time to parse.
2018-03-31 12:27:23 -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
BrennanConroy 44b667b3e6
Add detailed error option (#1763) 2018-03-30 11:30:07 -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 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 185453908f
Remove HubConnectionContext parameter from IHubProtocolResolver (#1735) 2018-03-27 10:25:00 -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 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
BrennanConroy db0dc0f960
Ignore writeasync failures when sending to multiple connections (#1589) 2018-03-16 16:48:05 -07:00
BrennanConroy c640f422e0
Pascal case formatted log parameter names (#1615) 2018-03-16 12:13:27 -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
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
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 974eb28b8b
Hub method reflection caching and invocation benchmarks (#1574) 2018-03-13 10:30:45 +13:00
James Newton-King d6178f2482
Fixed streaming hub method with ValueTask (#1572) 2018-03-10 12:31:38 +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 1790d6bdf0
Serialize once per format to increase perf in broadcasting scenarios (#1498) 2018-02-27 14:55:00 -08:00
Andrew Stanton-Nurse 6a2d41cc9f
Fix #924 by introducing HubDispatcher abstraction (#1479) 2018-02-22 20:59:34 -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 ae998ba172
Remove unneeded dependencies (#1443) 2018-02-12 23:58:44 -08:00
David Fowler 94155b0e89
Use protocol.abstractions primitives instead of socket abstractions (#1432) 2018-02-10 18:10:09 -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
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 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
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
Mikael Mengistu 6baee8b7a9
Refactor HubContext to not Implement IHubClients (#1262) 2018-01-02 17:26:10 -08:00