Commit Graph

44 Commits

Author SHA1 Message Date
Mikael Mengistu ed6badbabe Set X-Requested-With header and add HttpError (#623) 2017-07-05 16:02:04 -07:00
David Fowler d6f5e16f38 Support non blocking send on client (#603)
* Added support for non blocking sends on HubConnection
- Renamed Invoke to InvokeAsync
- Add support for non blocking send to TS client
- Add tests to make sure that non blocking sends don't send responses
2017-06-28 21:00:13 -07:00
Pawel Kadluczka 59e032dbcb Adding negotiation to TS client 2017-06-27 18:55:18 -07:00
BrennanConroy 0f264e18e9 Fix TS Client tests (#586) 2017-06-24 08:39:07 -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
David Fowler d169b96d2d Decouple IConnection.ts and HubConnection.ts from http (#566)
* Decouple IConnection.ts and HubConnection.ts from http
- Removed TransportType from start
- Renamed Connection.ts to HttpConnection.ts
2017-06-16 06:54:55 +02:00
David Fowler dbb438dc08 Remove content type from LongPollingTransport 2017-06-15 07:33:05 +02:00
Nate McMaster 05dd8c7386 Add the npm 5 lockfile to source 2017-06-08 09:47:17 -07:00
David Fowler 523517f60c Add support for timing out poll requests (#538)
* Add support for timing out poll requests
- Default poll request is 110 seconds (like in previous versions of SignalR)
- Use 200 with a 0 content length for timeouts.
- Added support for not timing out while debugging
2017-06-07 20:55:00 -10:00
David Fowler 50f1d8f9fe Added IHubProtocol to ts client (#537)
- Mimics the .NET client structure wise
- Also adds a JsonHubProtocol implementation
2017-06-07 05:46:27 -10:00
Pawel Kadluczka a14a0ab039 Adding structured negotiate 2017-06-06 15:53:21 -07:00
Pawel Kadluczka 028bd68bf5 Removing unneeded queryString from TS client 2017-06-06 14:02:01 -07:00
David Fowler 59a8f5f3b5 Simplify the JSON and protobuf protocols (#524)
- Remove message type and message format
- Updated tests
2017-06-06 07:18:23 -10: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
Pawel Kadluczka e31fc1e57d Closing transports with error if hubs cannot be created
- Preventing from closing long polling transport with 204 in case of
error
- Reporting an error to the client if WebSocket was not closed normally

Note in case of ServerSentEvents it is not possible on the client to
tell the difference between when the server closed event stream due to
an exception or because the client left OnConnectedAsync. In both cases
the client sees only that the stream was closed.

Part of: #163
2017-05-31 16:29:28 -07:00
Andrew Stanton-Nurse 263dd0e4fe Fix #324 by adding streaming support to the server (#461) 2017-05-31 09:10:20 -07:00
Mikael Mengistu b862d35b10 Update Targets (#486) 2017-05-26 20:00:12 -04:00
BrennanConroy a322fea940 Add data received logs to SSE and LongPolling in TS client (#484) 2017-05-24 08:49:59 -07:00
David Fowler d55ebfeee0 Split http and non-http layers (#487)
* Split http and non-http layers
- This change introduces Microsoft.AspNetCore.SignalR.Http
and Microsoft.AspNetCore.Sockets.Http which expose extension methods
on IAppBuilder for wiring up a sockets and signalr pipeline.
2017-05-24 07:09:46 -07: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
David Fowler 2aabce48b4 Remove custom routing and path matching from HttpConnectionDispatcher (#471)
- We're now using the routing system in a very vanilla way now that
we're not using the URL space as part of the protocol.
- Removed the path argument from the HttpConnectionDispatcher (simplifies code and removes duplication from tests)
2017-05-20 00:34:29 -07:00
David Fowler 240a88f7af Make the http end points more resty (#470)
- Use HTTP verbs to describe functionality for endpoints
- Updated TransportProtocols.md
2017-05-19 23:37:17 -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 ca9a44afc3 Merge branch 'rel/2.0.0-preview1' into dev 2017-05-04 14:11:16 -07:00
Mikael Mengistu 7f64811ccd Change targets (#437)
Target netcoreapp2.0
2017-05-04 14:05:58 -07:00
BrennanConroy e96096e760 Merge branch 'rel/2.0.0-preview1' into dev 2017-05-03 10:39:46 -07:00
BrennanConroy 0a3c7001d4 React to Logging API changes (#433) 2017-05-03 10:39:29 -07:00
moozzyk 39b2990b62 Preserving user's queryString
Fixes: #272
2017-04-27 09:50:14 -07:00
moozzyk 58e7c1b1fe Allowing passing ITransport to start 2017-04-27 09:50:14 -07:00
moozzyk e691e1cff8 Removing legacy raw format for `send`
Fixes issues #383 and #127
2017-04-18 11:34:43 -07:00
moozzyk 841ceb24b6 Fixing start/stop race in the TS client 2017-04-07 07:59:43 -07:00
moozzyk ebb2ce8fc9 Converting transport type from string to enum 2017-04-04 14:00:56 -07:00
moozzyk 7944be712f Allow starting connection only once 2017-04-04 10:49:10 -07:00
moozzyk d9faf17f5c * Fixing a racey test
* Fixing a misplaced test file
2017-03-31 13:54:46 -07:00
moozzyk af22fec225 Completing pending calls when the connection is closed
Also fixing a small leak where a callback would not be removed if inovke failed due to a send error
2017-03-27 16:00:31 -07:00
BrennanConroy 6130003193 Convert to netcoreapp2.0 (#338)
* Converted samples and test projects to run on netcoreapp2.0
2017-03-25 09:37:39 -07:00
moozzyk 70e4ec9a06 Introducing the IConnection interface
Unifying events
2017-03-23 16:07:35 -07:00
moozzyk 5642f09a83 Fixing TS client tests folder name
Mirroring disk folder structure for TS client in VS and adding missing files
2017-03-22 09:18:42 -07:00
Pawel Kadluczka 913354f688 Unifying errors in parsers 2017-03-20 10:32:06 -07:00
moozzyk 33c94c1a47 Replacing onError with onClosed
Unifying errors in transports
2017-03-20 10:32:06 -07:00
Nate McMaster c89ba8c1ec Consolidate dependency versions to one file 2017-03-15 19:34:12 -07:00
moozzyk 96aac19044 Creating TypeScript Client npm module during build 2017-03-14 15:26:53 -07:00
Pawel Kadluczka a00ec445ef Moving TS client to a dedicated subfolder (#274) 2017-03-09 09:42:59 -08:00