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
David Fowler
8dc68cb798
Use TryRead and TryWrite ( #113 )
...
* Use TryRead and TryWrite
- Use TryWrite to avoid errors on channel close for /send requests
- Use TryRead until it returns false for all transports but long polling
2017-01-11 12:27:18 -08:00
BrennanConroy
b3df10b638
Use connections format
2017-01-11 10:07:15 -08:00
David Fowler
cd9ed9228a
Remove streaming transport as a top level API ( #110 )
...
- Remove Streaming* classes from Sockets. The main
API will be channels based and streaming transports
will use the PipelineChannel (formerly FramingChannel) to
access messages.
- Added WriteAsync and ReadAsync to Connection and hid
the IChannelConnection from public API.
- Also fixed the fact that unknown methods caused server side
exceptions.
- Changed the consumption pattern to WaitToReadAsync/TryRead to avoid
exceptions.
- React to API changes
2017-01-11 04:01:49 -08:00
BrennanConroy
9dbb3742c8
Adding more tests
2017-01-10 16:27:23 -08:00
moozzyk
a9c7e14da0
Making HttpClient configurable and reusable
2017-01-10 16:19:26 -08:00
David Fowler
bd19022c4c
Fixed teardown for streaming connections
...
- Added mega hack for cancellation until we get newer pipeline
implementations.
2017-01-10 14:32:10 -08:00
David Fowler
baf7fce49d
Made some fixes to the disconnect sequence
...
- Fixed ChannelConnection to use IChannel<T> for
both sides of the connection. This allows use to close both the
input and the output when we are tearing down.
- Use TryComplete instead of complete to avoid exceptions thrown on
Complete(), particularly ChannelClosedException.
2017-01-10 14:32:10 -08:00
Andrew Stanton-Nurse
0af0318f43
fix rebase error
...
re-removed error handling from HubEndpoint, since HttpConnectionDispatcher handles it
2017-01-10 13:49:41 -08:00
Stephen Halter
b977c871ae
Remove unnecessary explicit dependency
2017-01-10 00:14:09 -08:00
Andrew Stanton-Nurse
d281cb72ea
add "messaging" endpoints and transports
...
* Need a separate set of primitives to handle messaging
* Using Channels (not Pipelines!) to provide the data flow for messaging
* All transports are now "message" based transports
* Added an adaptor to convert message-based transports to serve
streaming endpoints
2017-01-09 16:01:08 -08:00
moozzyk
217f707456
Sorting out exceptions
...
Making sure that OnConnected/OnDisconnected events are invoked correctly (e.g. if invoking OnDisconnectedAsync on hub threw we would not call OnDisconnectedAsync on lifetime manager and therefore we would continue to use/track connections that were already closed)
2017-01-09 08:29:44 -08:00
Pawel Kadluczka
dbf27c30c3
Introducing HubActivator ( #83 )
...
Fixes #60
2016-12-30 11:42:02 -08:00
moozzyk
8022afd3a2
Handling exceptions thrown on the server side
...
Addresses: #62
2016-12-26 22:39:48 -08:00
moozzyk
3a01d6cff1
Introducing async/await in TS client + minor clean up
2016-12-26 22:23:39 -08:00
Ajay Bhargav Baaskaran
12da346de9
Updating missed projects to 4.4 CoreFx packages
2016-12-22 14:37:42 -08:00
Pranav K
1492b41af0
Updating to 4.4 CoreFx packages
2016-12-21 22:57:01 -08:00
Mikael Mengistu
23c0522db9
Added missing copyright and license headers
2016-12-19 14:30:43 -05:00
Mikael Mengistu
e1d9aa2dd4
Early version of the .NET Client
2016-12-14 10:04:48 -08:00
David Fowler
df9057a6f7
Revert "Revert "React to hosting changes""
...
This reverts commit 12649b19bf .
2016-12-14 00:01:35 -08:00
David Fowler
12649b19bf
Revert "React to hosting changes"
...
This reverts commit f48bd8d185 .
2016-12-13 23:56:10 -08:00
David Fowler
f48bd8d185
React to hosting changes
2016-12-13 23:03:20 -08:00
moozzyk
46cf13b2fc
Hub connection tests
2016-12-09 11:43:49 -08:00
moozzyk
d3e625c985
End-to-end browser tests
2016-12-09 11:36:56 -08:00
Pawel Kadluczka
2b918b8fe2
Removing type name from hub method name ( #63 )
2016-12-06 11:17:00 -08:00
David Fowler
5f3c1060ab
Clean up shutdown management ( #59 )
...
* Clean up shutdown management
- ConnectionManager now implements IApplicationEvents. It makes testing cleaner
but makes service registration a little messy.
* Cleaned up service registration and layering a bit
- Added SocketsApplicationLifetimeEvents instead of implementing it
on ConnectionManager directly.
- Exposed ConnectionManager.CloseConnections()
2016-12-05 22:07:19 -08:00
BrennanConroy
28e3c8331b
Dispose Hubs from ActivatorUtilities
2016-12-05 15:40:01 -08:00
moozzyk
e6b34fdce3
Renaming RpcConnection to HubConnection
2016-11-29 16:03:56 -08:00
Russell Seamer
4158dfed8f
add net451 support to signalr.redis
2016-11-29 14:52:44 -08:00
moozzyk
2039a18971
Introducing modules for the ts client
2016-11-29 12:35:33 -08:00
David Fowler
1b59fc6f80
DI enabled Microsoft.AspNetCore.Sockets ( #47 )
...
* DI enabled Microsoft.AspNetCore.Sockets
- Added AddSockets extension method to IServiceCollection
- Inject IApplicationLifetime into ConnectionManager to handle
graceful shutdown and added test.
- Call AddSockets from AddSignalR
* PR feedback
- Added AddSignalR overload that takes Action<SignalROptions>
2016-11-26 23:09:38 -08:00
Andrew Stanton-Nurse
940ccf5c65
add tests to WebSockets transport ( #35 )
...
* add tests to WebSockets transport
* adds some error handling
* make logger factory required
* allow frames to be received after the application closes the output
2016-11-23 11:26:12 -08:00
moozzyk
f0a24720bc
Fixing build
2016-11-16 16:47:53 -08:00
BrennanConroy
35a1c4fae7
Add prefix to redis channel names
2016-11-16 09:58:10 -08:00
David Fowler
4aa65cf0bf
Updated to new System.IO.Pipelines package instead of Channels
2016-11-15 21:46:18 -08:00
Andrew Stanton-Nurse
f3ebe03a0b
fix #32 by handling connection header correctly ( #33 )
2016-11-15 16:22:50 -08:00
Andrew Stanton-Nurse
2431c5925c
integrate Channels-based WebSockets into SignalR ( #28 )
2016-11-15 15:05:45 -08:00
moozzyk
325c909dff
Removing transport fallback in the client
2016-11-14 14:42:53 -08:00
Pranav K
97bf8c3c09
Fix NuGetPackageVerifier issues
2016-11-11 11:44:20 -08:00
moozzyk
10c741b14e
Updating dependency version to fix a 0.3.0 => 1.1.0 upgrade warning
2016-11-11 10:49:54 -08:00
Pranav K
67129b2515
Update dependency versions
2016-11-10 10:27:21 -08:00
David Fowler
48b869f026
Don't hardcoded localhost for redis
...
- It breaks the *nix clients
2016-11-09 02:06:31 -08:00
BrennanConroy
812bffe6d0
Null check for deserialize
2016-11-08 15:41:54 -08:00
Andrew Stanton-Nurse
02c98137c7
install tsc during build ( #17 )
...
fixes #13
2016-11-08 15:31:02 -08:00
Andrew Stanton-Nurse
2de8f98a62
update doc comments on WebSocketConnection
2016-11-08 09:15:58 -08:00
David Fowler
9c592dac50
Builds on non windows
2016-11-08 00:47:09 -08:00
David Fowler
a5d38f4b64
Removed empty array
2016-11-07 23:57:09 -08:00
David Fowler
7d6b247780
Move argument conversion for json into JsonNetInvocationAdapter
2016-11-07 23:55:54 -08:00
David Fowler
d00f1f93b2
Added support for net451 and netstandard1.3
...
- Replaced Task.CompletedTask with TaskCache.CompletedTask
- Updated tests and src
2016-11-07 21:39:19 -08:00
David Fowler
239999e4c9
Make things actually work ( #10 )
...
- Added build.cmd
- Renamed the solution to match our conventions
- Fixed bad doc comment references
- Used strong name version of StackExchange.Redis
2016-11-07 20:58:41 -08:00
Andrew Stanton-Nurse
dfa9c927b7
clean up project.jsons and NuGet.config ( #9 )
...
* clean up project.jsons and NuGet.config
* clean up netstandard references
* clean up netstandard tfm
* change WebSockets descriptions
2016-11-07 14:00:41 -08:00
Andrew Stanton-Nurse
d299cc9186
apply license headers
2016-11-07 12:00:04 -08:00
David Fowler
217223e636
Generics overload
...
- Changed IHubConnectionContext and friends to be generic.
- Hub by default is Hub<IClientProxy>. We'll enable dynamic and arbitrary TClients in another commit.
2016-11-05 10:53:54 -07:00
David Fowler
9c10b89fa8
Small tweaks to sample
...
- Fix redis issues with removing while
- Use string interpolation in the Chat hub
2016-11-04 01:50:55 -07:00
David Fowler
6b3d9bd96d
Added group messaging to the sample
...
- Clean up some boiler plate
- Renamed Add/Remove on GroupManager to AddAsync and RemoveAsync
2016-11-04 01:28:49 -07:00
David Fowler
6ccc8d6195
Remove params from HubLifetimeManager
2016-11-04 00:37:04 -07:00
David Fowler
23eb8aa7bd
More redis tweaks
...
- Implemented the task queue
- Only subscribe to user channel if authenticated
2016-11-03 21:07:04 -07:00
BrennanConroy
ed41672381
Implemented better Redis scaleout
...
- Less subscriptions and connections to RedisHubLifetimeManager
2016-11-03 19:03:44 -07:00
BrennanConroy
dbd738726a
Remove unused usings
2016-11-03 15:00:13 -07:00
BrennanConroy
60bc57fb8d
Fix redis subscriptions and missing awaits
2016-11-03 14:58:27 -07:00
David Fowler
b114e4e9fd
Get rid of RpcEndpoint and samples
...
- Merge RpcEndpoint and HubEndPoint, still need to move discovery of hub
methods to another class.
2016-11-03 00:17:01 -07:00
David Fowler
f51fcadeb1
Dispose the ConnectionManager on application shutdown
2016-11-02 23:14:12 -07:00
Pawel Kadluczka
8d03c014fb
Fixing invocation results for tasks whose result is `VoidTaskResult`
2016-11-02 22:52:52 -07:00
David Fowler
5f23231d9b
Make ConnectionMetadata object,object dictionary
2016-11-02 22:30:16 -07:00
David Fowler
0e690d636f
Remove casts where possible
2016-11-02 22:17:03 -07:00
David Fowler
7db1eb8f25
Add Async suffix to everything
2016-11-02 22:02:29 -07:00
David Fowler
a175609bb1
Start transport before endpoint
2016-11-02 21:28:05 -07:00
David Fowler
b6f15338eb
Cleanup and shuffling things
...
- Moved the InvocationAdapterRegistry registration to SignalROptions
- Moved the JsonNetInvocationAdapter to Microsoft.AspNetCore.SignalR
- Remove dead JavaScript code
2016-11-02 20:54:58 -07:00
David Fowler
8dd61250f4
Fix the projects
...
- Fixed dependencies
- Fixed NS dependency
2016-11-02 18:50:57 -07:00
moozzyk
2bbca5e7fe
Adding error handling
...
Fixing SSE transport on the server
2016-11-02 17:09:11 -07:00
moozzyk
61c527f23c
Fixing LongPolling transport
2016-11-02 17:09:11 -07:00
moozzyk
ce17f0d19a
Adding transport selection
...
Fixing serverSentEvents transport
Updating the client 'app'
2016-11-02 17:09:11 -07:00
moozzyk
752f329036
WIP:
...
- separating Connection from RpcConnection
- fixing WebSockets transport to work after rewrite
- clean up
2016-11-02 17:09:11 -07:00
moozzyk
466c8d9db9
Adding ServerSentEvents
2016-11-02 17:09:11 -07:00
moozzyk
181053e876
Adding longpolling
2016-11-02 17:09:11 -07:00
moozzyk
29d859b383
WIP
2016-11-02 17:09:11 -07:00
Pawel Kadluczka
5663198733
WIP
2016-11-02 17:09:11 -07:00
moozzyk
6859d33536
ts-client WebSockets + JSON
2016-11-02 17:09:11 -07:00
moozzyk
5e3be6e212
Awaiting tasks returned from hubs and getting the actual result
2016-11-02 17:03:30 -07:00
Andrew Stanton-Nurse
b2108a6d65
major updates to WebSockets implementation
...
* Ping/Pong handling
* UTF-8 validation
* Customization through WebSocketOptions
* Closes connection on Protocol Errors
* Autobahn Test Suite integrated
2016-11-02 11:27:56 -07:00
David Fowler
9e7513a7bd
Added UseSignalR
2016-11-02 03:20:44 -07:00
David Fowler
6af6db67f4
More refactoring
...
- Moved the IHubConnectionContext implementation out of HubEndPoint
- Added IHubContext to allow getting at the publish side of things without
being in side the hub. The HubEndPoint now injects this as well.
- HubContext has the implementation of the IHubConnectionContext
- Moved ISignalRBuilder and SignalRBuilder into their own files
2016-11-02 03:03:35 -07:00
David Fowler
f41bcb9b2d
Subscribe in parallel
2016-11-02 02:46:52 -07:00
David Fowler
377711f68c
Changes to redis and groups
...
- Made group add and removal async as they may be backed by a network
connection
- Added ISignalRBuilder and a pattern similar to mvc for doing extension methods off
AddSignalR
- Added RedisOptions
2016-11-02 02:29:04 -07:00
David Fowler
40039afd4f
Make a SignalR project and SignalR.Redis project
...
- Moved RPC into SignalR for now since we don't have a middle layer yet.
- Fixed up name spaces
2016-11-02 01:49:05 -07:00
David Fowler
53858495dc
Hubs are more fleshed out ( #11 )
...
- `HubEndPoint<T>` : `RpcEndPoint<T>` where T is the Hub type. Optimizing for a single hub per connection here.
- Hubs get OnConnectedAsync and OnDisconnectedAsync methods that are invoked at the right time and with the right scope.
- Introduced HubLifetimeManager<THub> (naming TBD) which is the center of the universe for Hub behaviors.
2016-11-01 23:15:31 -07:00
moozzyk
ffc0a048e3
Addressing review comments
2016-10-27 09:30:20 -07:00
moozzyk
fd10deba6c
Removing formatters
2016-10-27 09:30:19 -07:00
moozzyk
a8c831bad6
Very hacky protobuff support
2016-10-27 09:30:06 -07:00
moozzyk
fb387ed03d
Decoupling formatters from endpoints
...
Moving formatters out from Sockets
2016-10-25 16:37:23 -07:00
moozzyk
8b905907fe
Typed formatters
2016-10-25 16:37:22 -07:00
moozzyk
f64c986b5d
Adding support to non-Json hub invocation
2016-10-25 16:37:21 -07:00
Andrew Stanton-Nurse
affcb935d7
clean-up and renaming
...
renamed WebSockets project to clarify it's internalityness
2016-10-17 15:27:23 -07:00
Andrew Stanton-Nurse
d2dbd473a0
@davidfowl love dat Func<...,object,...>,object pattern
2016-10-14 15:09:06 -07:00
Andrew Stanton-Nurse
a1c0970222
move prototype WebSockets-over-Channels code in
...
nothing is wired up to anything in Sockets yet, it's just a copy of the
code
2016-10-14 14:36:18 -07:00
David Fowler
8bd8887213
Don't call CompleteReader, the dispatcher can handle that
2016-10-09 15:07:30 -07:00
David Fowler
08bba972c1
React to channel API changes
2016-10-07 16:18:23 -07:00
David Fowler
eef2f14c78
Flush even before we get end of message
2016-10-07 01:06:04 -07:00
moozzyk
bbecb0c0dc
Fixing SSE transport
...
Content-Encoding: identity disables all the transformations and therefore fixes the issue where IIS is buffering SSE data
2016-10-06 14:20:54 -07:00
David Fowler
3032909f3c
Added tests
2016-10-04 01:32:30 -07:00
David Fowler
e5e8d1bee3
Decouple the dispatcher from routing for easier testing
2016-10-04 00:12:07 -07:00
David Fowler
411f44f263
Reduce code duplication
2016-10-03 23:52:51 -07:00
David Fowler
1647432ef6
Added Connection property to EndPoint
...
- Exposes a list of connections for user code to act on
- The connection list is thread safe (uses a concurrent dictionary under the hood)
- Removed the Bus and just used the connection list in the samples
2016-10-03 22:58:56 -07:00
moozzyk
4cd4ddfad5
More structed connection metadata
2016-10-03 14:03:10 -07:00
David Fowler
2b7a396670
When EndPoint ends, the connection ends.
2016-10-03 02:41:28 -07:00
David Fowler
99d7aea78c
Add User to Connection
2016-10-03 02:08:31 -07:00
David Fowler
8e66d63577
Code cleanup (somewhat)
...
- Transports have be drastically simplified due to channels
- Make sure tasks don't leak
2016-10-03 01:52:18 -07:00
David Fowler
e018fe70f7
Handle message fragments
2016-10-02 23:41:06 -07:00
David Fowler
9ee33bf01f
Add transport connection metadata
2016-10-01 23:49:07 -07:00
David Fowler
1ad1120c41
Update the LastActive for reserved connections
2016-10-01 15:59:20 -07:00
David Fowler
2a369f40f6
Small fixes
...
- Pass the Connection to each IHttpTransport
- FlushAsync after writing for WebListener
- Add metadata to Connection
- Added WebListener dependency
2016-10-01 11:52:50 -07:00
David Fowler
9f5ef70164
Added support for websockets
...
- Upgraded to ASP.NET Core 1.1 preview
2016-10-01 10:26:49 -07:00
David Fowler
40ecc9df4d
Remove GetOrAdd from AddNewConnection
2016-10-01 03:53:00 -07:00
David Fowler
f4f763f136
Only run next queued task if the previous was successful
2016-10-01 03:29:49 -07:00
David Fowler
5baaaac22d
Added comments and more tiny code clean up
2016-10-01 03:22:09 -07:00
David Fowler
5195e75b74
Tiny tweaks
2016-10-01 03:09:07 -07:00
David Fowler
813222b406
More cleanup + TaskQueue
...
- Introduced the TaskQueue
- Added IHttpTransport so abort callbacks can happen outside of the
transport implementation
2016-10-01 03:03:20 -07:00
David Fowler
ad2724b22c
Split Connection and ConnectionState
2016-10-01 00:57:35 -07:00
David Fowler
7b8e947567
Use new CopyToAsync method
2016-10-01 00:51:51 -07:00
David Fowler
c3753c4f0e
Renamed the project and split into class library and sample
2016-10-01 00:43:33 -07:00
David Fowler
de291d4d2a
Refactoring
...
- Move http stuff into Http dispatcher
- Exposed IChannel from connection
- Clean up ConnectionManager (tho it's not great yet)
2016-09-30 22:11:29 -07:00
moozzyk
239b5f815f
Fixing longpolling
2016-09-30 15:13:21 -07:00
moozzyk
32ed7ca0c4
SSE kind of works - duplicate messages
2016-09-30 14:21:37 -07:00
David Fowler
27ddb7de90
More cleanup
2016-09-30 02:41:07 -07:00
David Fowler
03352354dc
Initial commit
2016-09-30 01:44:56 -07:00