Commit Graph

170 Commits

Author SHA1 Message Date
Kiran Challa 49e0829903 Removed unnecessary references 2017-06-01 15:27:19 -07:00
David Fowler d10a6293bd Discover hub methods at startup time (#503)
* Discover hub methods at startup time
- Errors will show up earlier as a result instead of cryptic
first connect errors.
2017-06-01 09:47:39 -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
Pawel Kadluczka cb9f44ddf6 Fixing WebSocketsTransport to handle exceptions correctly
Exceptions thrown when sending or receiving messages would leave the
WebSockets transport in a half-closed state when one of the loops is
closed but the other one is still running preventing from the
Connection.Closed event to be fired.

Fixes: #412
2017-05-26 07:58:44 -07:00
Hao Kung fbf7e1fb72 Add auth reference 2017-05-25 21:56:28 -07:00
Hao Kung 42739b064f React to Auth + switch to PolicyEvaluator 2017-05-25 18:22:51 -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 e68a1b294f Fix long polling graceful shutdown (#476)
- If a message was sent and the application was ended in the same
poll request, the connection would be closed by the time the next poll
came in which resulted in a 404. This change waits until the transport writes
all data before closing it.
- Also fixed a test so that the exception started to show client side.

#469
2017-05-22 09:07:26 -07:00
David Fowler 323dae4ce9 Handle case where scanning happens after dispose. (#475)
- ConnectionManager.Scan would null ref because the timer.Change was being called
after closing all connections.
2017-05-21 23:19:17 -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
Pawel Kadluczka 4bb9721d39 Adding strongly typed Invoke and On overloads
See: #311
2017-05-19 09:47:16 -07:00
Nate McMaster ef7a3514cd Upgrade test framework versions and fix test issues (#453) 2017-05-15 12:50:30 -07:00
Mikael Mengistu 04863032a2 Increase the size of the WebSockets buffer to 4K. (#448) 2017-05-15 13:14:45 -04:00
Pavel Krymets 67ecd4746e Remove unnecessary package references (#446) 2017-05-10 15:14:26 -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
BrennanConroy 1da4e07fff Use common ObjectMethodExecutor (#440) 2017-05-07 10:05:21 -07:00
Pawel Kadluczka 9d07eeef91 Merge branch 'rel/2.0.0-preview1' into dev 2017-05-05 17:11:55 -07:00
Pawel Kadluczka c053b8cd9d Fixing Win7 tests 2017-05-05 17:10:23 -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
Mikael Mengistu db868af8d8 Added stricter SSE message type parsing (#410) 2017-04-28 11:58:10 -07:00
moozzyk 82f99a1424 Work around for a Firefox bug
Firefox won't fire EventSource open event until it receives some data. The workaround is to send an empty comment when starting ServerSentEvent transport.

Fixes: #352
2017-04-27 10:34:47 -07:00
Mikael Mengistu 74b318b3e4 Support binary messages in SSE parser (#418) 2017-04-26 15:04:48 -07:00
Andrew Stanton-Nurse 5aea7292cd prevent websocket deadlock (#419) 2017-04-25 15:18:47 -07:00
Andrew Stanton-Nurse 1018a20c61 more logging (#417) 2017-04-24 12:38:39 -07:00
Andrew Stanton-Nurse fc54ffc96e fix build 2017-04-20 16:06:15 -07:00
Andrew Stanton-Nurse 64e9cba14d fix build broken by PlatformAbstractions (#409) 2017-04-20 14:17:45 -07:00
Andrew Stanton-Nurse c2eec09ba0 react to removal of PlatformAbstractions (#405) 2017-04-20 11:01:06 -07:00
Mikael Mengistu 8c8f6c708b Server-Sent Events Transport + Parser (#401) 2017-04-18 16:08:48 -07:00
moozzyk e691e1cff8 Removing legacy raw format for `send`
Fixes issues #383 and #127
2017-04-18 11:34:43 -07:00
Kiran Challa fd7707e7d2 Upgraded IntegrationTesting package to 0.4.0 2017-04-14 16:38:21 -07:00
moozzyk db66b1e553 TransportFactory should not try creating WebSocket transport on Win7/2008R2 2017-04-11 16:34:20 -07:00
BrennanConroy 9993fd96da Use policy names in EndPointOptions (#340) 2017-04-11 12:35:31 -07:00
moozzyk 04719dee82 Adding transport factory 2017-04-11 09:16:36 -07:00
David Fowler 0546dc21f4 Disable response buffering via the IHttpBufferingFeature (#379)
* Disable response buffering via the IHttpBufferingFeature
- To make sure SignalR works with servers and middleware
that do perform response buffering, disable it via the
IHttpBufferingFeature for SSE.
- Added test to verify buffering is disabled
2017-04-10 19:05:06 -07:00
Kai Ruhnau 4c183b4d00 Quickly fail the UFT-8 validation if the first byte is already invalid 2017-04-10 12:23:46 -07:00
BrennanConroy 2dfada051e React to CoreFx changes 2017-04-05 08:48:30 -07:00
David Fowler 5df022df0c Remove skipped tests and increased timeout for failing test 2017-04-04 22:13:12 -07:00
David Fowler 3b8e1a5380 Added a close timeout to the web socket transport
- Today we don't end the request if the application completes
but the websocket transport hasn't gotten the receive frame as yet.
This changes adds a WebSocketOptions.CloseTimeout to EndPointOptions
that allows configuring this timeout. When the timeout is reached, we abort
the connection and end the transport task so that the request can end.
- Added tests for websocket timeout and skipped tests for application timeouts
2017-04-04 09:59:41 -07:00
David Fowler 87e6da6e4c Handle exceptions and Cancellation in DisposeAsync (#366) 2017-04-03 22:21:41 -07:00
David Fowler 8da2dddd49 Fix issue where multiple calls to dispose don't wait properly (#360)
* Fix issue where multiple calls to dispose don't wait properly
- DisposeAsync returned immediately to anyone but the first caller.
This means that it was possible to end the request before properly
waiting on the transport task which means writing after dispose was possible.
- Added a test
2017-04-03 15:25:45 -07:00
BrennanConroy f6f0007c12 React to CoreFx byte[] slice 2017-04-03 11:45:00 -07:00
Alexis Nowikowski 3d29b7854b Bugfix issue #355: Don't handle Invocation when no InvocationHandler … (#356)
- Don't handle Invocation when no InvocationHandler is present
2017-03-31 09:44:57 -07:00
moozzyk fb512bbf41 Using common XUnitLoggerProvider
Fixes #331
2017-03-27 16:19:40 -07:00