Commit Graph

174 Commits

Author SHA1 Message Date
Mikael Mengistu c3b33a2676 Add Url + ILoggerFactory ctor for HubConnection (#253) 2017-02-28 16:52:42 -08:00
BrennanConroy 0abac4a20d Fix null ref in DisposeAsync on ConnectionState 2017-02-28 11:44:25 -08:00
Mikael Mengistu c1a4b25a66 Remove logger factory requirement from HubConnection (#238) 2017-02-28 10:48:45 -08:00
Nate McMaster af5e7da478 Remove workarounds and unify dependency versions 2017-02-23 17:09:07 -08:00
Andrew Stanton-Nurse 08c550655a use new Base64 codec in Text and SSE Formatters (#231)
fix #192
2017-02-22 16:26:58 -08:00
Andrew Stanton-Nurse 9767dbd5c1 fix #209 by converting to byte[] (#229)
* fix #209 by converting to byte[]
2017-02-22 11:50:37 -08:00
Andrew Stanton-Nurse 701612c859 fix #204 by implementing SSE formatter (#210) 2017-02-22 09:30:31 -08:00
Andrew Stanton-Nurse f84362cc76 one last try to get this test de-flaked (#227) 2017-02-21 16:15:32 -08:00
Andrew Stanton-Nurse 755ba7613e Fix #215 and restore tests (#218)
* fix #215 by properly handling pipe closure

* pr feedback

* pr feedback
2017-02-21 15:27:52 -08:00
moozzyk 9709139a27 Fixing a bug where pending invocations were not terminated correctly 2017-02-21 14:07:51 -08:00
moozzyk 12c6a4b917 Adding IConnection interface 2017-02-21 14:07:50 -08:00
moozzyk 7a4746868a Removing Dispose from Transport, Connection and HubConnection
Converting StopAsync to DisposeAsync
2017-02-21 13:36:54 -08:00
moozzyk cc7f835e1d Creating npm package for ts client 2017-02-21 11:37:13 -08:00
David Fowler a0dae7cb0e Revert "Revert "React to CoreFxLab changes (#225)""
This reverts commit f9529f00b9.
2017-02-20 00:40:02 -08:00
David Fowler f9529f00b9 Revert "React to CoreFxLab changes (#225)"
This reverts commit 28455f647e.
2017-02-20 00:31:06 -08:00
Pranav K 28455f647e React to CoreFxLab changes (#225) 2017-02-19 23:41:19 -08:00
BrennanConroy 6f33ebc1f5 ObjectMethodExecutor 2017-02-17 10:19:32 -08:00
moozzyk a13aa4de10 Using webSockets transport as the default transport
Fixes: #213
2017-02-17 09:58:23 -08:00
Nate McMaster 92b3cb1592 React to API changes in System.Text.Primitives 2017-02-15 14:23:11 -08:00
Nate McMaster f684fcb574 Downgrade to stable packages 2017-02-15 14:23:11 -08:00
moozzyk a3e847e6cc De-statificying HubConnection
Wiring and raising events correctly
2017-02-15 12:15:35 -08:00
moozzyk d4fbdd055a Raising Received event 2017-02-15 12:15:35 -08:00
moozzyk 4f6306f352 Adding rasing Connected and Closed events 2017-02-15 12:15:35 -08:00
moozzyk 966470d269 Adding connection state 2017-02-15 12:15:34 -08:00
moozzyk 3ba95b98af Converting static ConnectAsync to instance StartAsync 2017-02-15 12:15:34 -08:00
Andrew Stanton-Nurse 70d97dd7b8 finish binary protocol formatter/parser (#203) 2017-02-15 12:11:52 -08:00
moozzyk 94dc265658 Fixing build after merge 2017-02-15 09:49:39 -08:00
Mikael Mengistu cb7692d16e WebSockets Transport (#185)
WebSockets transport
2017-02-15 09:24:41 -08:00
Andrew Stanton-Nurse a728e1da41 Text Protocol Formatter (#187) 2017-02-14 16:00:51 -08:00
David Fowler fc93c47789 Use Monitor.TryEnter/Exit in the Scan loop (#189)
- Avoids overlapping Scans
- Noops if dispose is being called at the same time
2017-02-10 16:34:31 -08:00
moozzyk 633c572a22 Fixing build 2017-02-09 10:59:41 -08:00
Pawel Kadluczka 0c8df245de Hiding Channels (#183)
Hiding Channels
2017-02-09 10:31:07 -08:00
Nate McMaster 7281bf90c0 Upgrade to VS 2017 (#176) 2017-02-02 12:54:23 -08:00
Mikael Mengistu 5def499323 Added Sockets.Common and connection level testing (#173)
*Moved IChannelConnection, ChannelConnection, Format and Message to the new Sockets.Common project.

* Adding Connection level tests.
2017-01-31 14:59:21 -08:00
Dan Kirkham b32d3ad4e1 Removed explicit capturing of "this" for lamdas (#167)
* Removed explicit capturing of "this" for lamdas

* Capture current Id when invoking connection
2017-01-31 13:47:14 -08:00
David Fowler eafbe74160 Fixed parameter count mismatch when invoking methods with wrong case (#162)
* Fixed parameter count mismatch when invoking methods with wrong case
- Hub methods were being tracked with 2 dictionaries, one for parameter names
the other for callbacks. This change introduces a single dictionary that stores
the hub name to a HubMethodDescriptor. That descriptor stores the parameter types
and method info for the bound hub method.
- The callback is now just an invoke method on the HubEndPoint itself.
- Added tests for case sensitivity in hub method names
2017-01-26 18:25:49 +00:00
moozzyk c997ea8165 Converting pipelines to channels 2017-01-26 08:04:58 -08:00
moozzyk 1119bcf1b3 Sharing channel connections 2017-01-26 08:04:56 -08:00
David Fowler 05cc7792df Synchronize the background scan and closing of connections
- It was possible for the application to be torn down during
a background scan. When that happened, the timer would be disposed
before the end of the scan and would throw an ObjectDisposedException
when timer resumption happened. This change introduces a lock that avoids that
race.

Fixes #161
2017-01-26 07:50:29 +00:00
David Fowler 162cd1fc06 Handle misbehaving user code (#159)
* Handle misbehaving user code
- Execute EndPoint logic on a threadpool thread
- Turn synchronous exceptions into async ones to unify the
error handling
- Added tests
2017-01-25 23:45:43 +00:00
David Fowler 934f6a70d1 Various fixes in HttpConnectionDispatcher (#151)
- The connection state object is manipulated by multiple parties in a non thread safe way. This change introduces a semaphore that should be used by anyone updating or reading the connection state. 
- Handle cases where there's an active request for a connection id and another incoming request for the same connection id, sse and websockets 409 and long polling kicks out the previous connection (https://github.com/aspnet/SignalR/issues/27 and https://github.com/aspnet/SignalR/issues/4)
- Handle requests being processed for disposed connections. There was a race where the background thread could remove and clean up the connection while it was about to be processed.
- Synchronize between the background scanning thread and the request threads when updating the connection state.
- Added `DisposeAndRemoveAsync` to the connection manager that handles`DisposeAsync` throwing and properly removes connections from connection tracking.
- Added Start to ConnectionManager so that testing is easier (background timer doesn't kick in unless start is called).
- Added RequestId to connection state for easier debugging and correlation (can easily see which request is currently processing the logical connection).
- Added tests
2017-01-25 22:27:55 +00:00
Dan Kirkham acd1dc5e24 Fixed inconsistent single quotes (#154) 2017-01-25 09:43:02 -08:00
David Fowler 9eb42cce2d Clean up disposal of connection state (#148)
* Clean up disposal of connection state
- Removed IDisposable and added a DisposeAsync method to ConnectionState
- Added ApplicationTask and TransportTask to ConnectionState as first class
properties so that it is easy to see (in a process dump or debugger) the
outstanding tasks that Sockets is keeping track of on a per connection basis.
2017-01-25 00:08:08 +00:00
David Fowler a1c8d3d841 Fix the TS client to respect the new endpoint
- Seems like the ts client wasn't updated to use /negotiate instead
of /getid
2017-01-24 21:12:53 +00:00
David Fowler 1e957a9e5a Allow processing of incoming invocations in parallel (#143)
* Allow processing of other incoming invocations in parallel
- Don't wait on the response of an invocation to pick up
the next message from the channel.
- Unhandled exceptions should continue bubbling up correctly
2017-01-24 20:46:17 +00:00
BrennanConroy aec52670b4 React to Channel API changes 2017-01-19 08:15:59 -08:00
Pawel Kadluczka ac8a6c9f67 Adding infrastructure to write node (a.k.a. unit) tests for ts client (#129) 2017-01-18 13:25:23 -08:00
Andrew Stanton-Nurse 464077866c rename getid to negotiate (#124)
* rename getid to negotiate
* also change SSE and Long Polling to require a pre-established connection
* disallow changing transports mid-connection; return a 400 response if the user attempts to do so
2017-01-17 15:45:29 -08:00
BrennanConroy 3d5fc9493a Remove format from connect and only use it in /send 2017-01-17 11:32:27 -08:00
David Fowler 172a20c4ec Use WaitToWriteAsync(), TryWrite() in HubLifetimeManager(s) (#122) 2017-01-11 22:13:12 -08:00