Commit Graph

22 Commits

Author SHA1 Message Date
Pavel Krymets 4a4efe0f39
Update to new corefx (#1561) 2018-03-08 14:23:20 -08:00
David Fowler 28439d1441
Initial changes to move to pipelines (#1424)
- Change the Sockets abstraction from Channel<byte[]> to pipelines.

#615
2018-02-09 17:45:21 -08:00
Andrew Stanton-Nurse c1d2024864
Implement #1156 by having the server send Ping messages (#1161) 2017-12-04 14:43:27 -08:00
BrennanConroy 792745ad98 React to CoreFxLab packages (#998) 2017-11-13 15:05:35 -08:00
David Fowler 9602787463 Fix broken SSE transport 2017-06-23 14:27:03 -07:00
BrennanConroy 0298868c00 Reorganize and add more logging to Sockets.Http (#549)
* Move Sockets.Transports to internal namespace
2017-06-15 08:24:43 -07: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
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
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
Andrew Stanton-Nurse 78dfd278c1 Integrating new transport protocols (#257) 2017-03-07 10:46:36 -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 a728e1da41 Text Protocol Formatter (#187) 2017-02-14 16:00:51 -08: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
BrennanConroy aec52670b4 React to Channel API changes 2017-01-19 08:15:59 -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
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
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 7db1eb8f25 Add Async suffix to everything 2016-11-02 22:02:29 -07:00
David Fowler 3032909f3c Added tests 2016-10-04 01:32:30 -07:00