Commit Graph

31 Commits

Author SHA1 Message Date
David Fowler f21f5039b2 Replace ConnectionContext with HubConnectionContext (#629)
* Replace ConnectionContext with HubConnectionContext
- The SocketDelegate implementation owns the transport pipe,
it's a single producer single consumer model. SignalR needs to support
multiple producers so that broadcast, return values and sending to individual
connections works. This change introduces a multi producer channel that is used
by all producers to copy data to the transport safely. This will make the move
to pipelines easier.
2017-07-03 17:44:28 -07:00
David Fowler a84ba8820f Use Channel<byte[]> as the abstraction (#579)
* Use Channel<byte[]> as the abstraction
2017-06-23 09:52:35 -07:00
David Fowler 41f54d001b Remove dependencies on a bunch of corefxlab things (#576)
* Remove dependencies on a bunch of corefxlab things
- Used Stream instead of IOutput
- Removed pipelines dependency in most places.
2017-06-22 09:23:52 -07:00
Mikael Mengistu 680c48d584 Change Group Add and Remove API (#522) 2017-06-06 21:50:34 -04:00
David Fowler 38efde7b50 Merge transport and hub protocols (#517)
* Merge transport and hub protocols
- This change merges the transport and hub protocols into a single protocol. The
idea being that sockets in a purely streaming layer that sends frames from the underlying
transport. This makes things like TCP possible and doesn't impose a framing layer at the lowest
level. This will make it possible to build servers like kestrel on top of the TCP layer.
- The Message was removed from the lowest layer of the stack and pushed into the hubs layer. Hub invocations
are framed with what was before the transport protocol. Connections also need to state upfront if they support
binary or not. This will determine how data will be serialized to the specific connection.
- Changed the SSE parser and writer to be strictly SSE without any of the transport protocol specific
information.
- To ensure we aren't using types in the wrong layers
- Moved protocol logic into SignalR
- Socket.Abstractions is now the root of the universe, Sockets.Common will likely be removed
or turned into Sockets.Common.Http.
- Move SSE parser to Sockets.Client and SSE writer into Sockets.Http
- Moved tests into the appropriate test projects
- Updated the spec
2017-06-05 09:45:40 -10:00
David Fowler 42e2715a95 Removed EndOfMessage from Message (#513)
* Removed EndOfMessage from Message
- The webSockets transport no longer supports partial payloads so
this feature is now gone.
2017-06-03 08:32:28 -10:00
David Fowler 9d9a52119e Progress towards splitting the layers (#473)
* Progress towards splitting the layers
- This is based on the work anurse did in anurse/endpoint-middleware-spike to
introduce a connection middleware pipeline that mimics much of our http
pipeline. The intent is that this layer will be generic enough to build both
SignalR and Kestrel on top of but we're not there yet. This change makes incremental
progress towards splitting apart sockets and http so that we can add the tcp transport
without breaking everything all at once.
- Created Microsoft.AspNetCore.Sockets.Abstractions where the primitives for
sockets live. That includes, ConnectionContext (formerly Connection), EndPoint,
ISocketBuilder, SocketDelegate, etc.
- ConnectionContext isn't in it's final form as yet, it still very closely mirrors
the original Connection object we had so that tests continue to pass.
- The HttpConnectionDispatcher doesn't know about EndPoint anymore, it just cares
about invoking the SocketDelegate.
- EndPointOptions has been removed as part of this change as it coupled http specific configuration
to the end point type. There's a new HttpSocketOptions that needs to be passed into MapSocket calls.
- Updated the tests to deal with the API changes.
2017-05-23 02:43:32 -07:00
Andrew Stanton-Nurse 991c1d8517 Implement new Hub Protocol (Part Deux) (#390)
* convert to new protocol
* removed InvocationDescriptorRegistry because we're not yet sure about custom protocols
* update SocialWeather sample
* Moving ts client to using new protocol
* make the functional tests a little easier to run on ctrl-f5
2017-05-09 12:24:58 -07: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 a728e1da41 Text Protocol Formatter (#187) 2017-02-14 16:00:51 -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
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
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
Mikael Mengistu e1d9aa2dd4 Early version of the .NET Client 2016-12-14 10:04:48 -08:00
Russell Seamer 4158dfed8f add net451 support to signalr.redis 2016-11-29 14:52:44 -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 d299cc9186 apply license headers 2016-11-07 12:00:04 -08: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 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 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 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