Commit Graph

47 Commits

Author SHA1 Message Date
Dylan Dmitri Gray 76706144a5 Add support for streaming arguments to clients using Channel (#2441) 2018-08-01 09:31:43 -07:00
Dylan Dmitri Gray 748e992865
Dygray/handshake versioning (#2520)
* set minor versions on the protocols
2018-07-05 16:42:42 -07:00
Dylan Dmitri Gray 3d0f68b22c
server closes connections that have gone silent (#2364) 2018-06-05 15:21:55 -07:00
Dylan Dmitri Gray 736b7f5042
Client pings server on interval (#2309) 2018-05-23 13:53:23 -07:00
James Newton-King 6eac7049ba
Update text and binary formatter helpers to be shared (#2035) 2018-04-16 15:19:34 +12:00
Andrew Stanton-Nurse 43e6ab750a
Fix #1927 by using Synchronous Callbacks everywhere. (#2003) 2018-04-13 11:38:03 -07:00
David Fowler 3e69fdc4ad
Delegate disposable to the IConnectionFactory (#1999)
- Added DisposeAsync to the IConnectionFactory. It's responsible for disposing the connection after the pipe has closed.
- Added dispose callback to WithConnectionFactory
- Don't wait for poll request to end before unwinding from the transport
- Make sure all http requests are done before returning from StopAsync in both SSE and longpolling
2018-04-13 09:16:23 -07:00
David Fowler abe139ee16
Make the protocol and messages public (#1994)
* Move types to a .Protocol namespace
2018-04-13 01:53:41 -07:00
David Fowler 9fd713c73a
Make MemoryBufferWriter a Stream (#1907)
- Get rid of LimitArrayPoolWriteStream and use MemoryBufferWriter in its place in the MessagePackProtocol implementation.
- Added tests for MemoryPoolBufferWriter and fixed a bug in CopyToAsync
- Added CopyTo(`IBufferWriter<byte>`)
- Changed MemoryBufferWriter to fill the underlying arrays that back segments, the segment size is now a minimum.
2018-04-08 16:11:17 -07:00
David Fowler c1049b722d
The grand unification of ConnectionContext (#1895)
This change rationalizes the 2 very similar abstractions that exist in Connections.Abstractions, IConnection and ConnectionContext. It also introduces an IConnectionFactory to SignalR that is used to create a new ConnectionContext for a HubConnection.

- HubConnection just completes both ends of the transport pipe instead of calling DisposeAsync.
- Implemented ConnectionContext on HttpConnection and added HttpConnectionFactory
-  Updated tests
2018-04-07 16:19:01 -07:00
James Newton-King acc0b7ad0d
Serialize NegotiateResponse with IBufferWriter (#1881) 2018-04-07 15:50:13 +12:00
BrennanConroy 5ce672dfe6
ThreadStatic MemoryBufferWriter (#1821) 2018-04-02 11:25:04 -07:00
BrennanConroy 903a9ea6a0
Use IBufferWriter in IHubProtocol (#1791) 2018-03-30 17:30:08 -07:00
Andrew Stanton-Nurse 6b3a27e73c
Bedrock Renames (#1777) 2018-03-30 15:09:19 -07:00
BrennanConroy 46f27cdd0b
Fix internal HubConnection state when handshake fails (#1774) 2018-03-29 16:35:31 -07:00
David Fowler 7a53e07623
Parse data as it comes in off the wire in the .NET client and server (#1766)
- Change websockets and the POST end point to send data unbuffered.
- Update tests to handle partial frames
2018-03-29 10:03:59 -07:00
James Newton-King 8c84518ecc
Message writing optimization (#1683) 2018-03-29 11:03:40 +13:00
Andrew Stanton-Nurse cfaa123eb8 IConnection refactoring (#1718)
- IConnection is now single-use and HubConnection creates a new instance
for reconnecting
- IConnection is just a Pipe now, no more events
2018-03-27 23:02:07 -07:00
David Fowler 2e63e5afe3
The rename games part 1 of many (#1696)
- React to rename of EndPoint to ConnectionHandler
- Rename UseSockets to UseConnections
- Rename MapEndPoint to MapConnectionHandler
- Rename HttpSocketOptions to HttpConnectionOptions
2018-03-22 22:35:55 -07:00
James Newton-King 4f10560087
Rename negotiate to handshake, add handshake response, add close frame (#1591) 2018-03-20 17:40:22 +13:00
David Fowler dc0567690d
Use features from Protocol.Abstractions (#1594)
- This is part of the grand unification of the connection layer between SignalR and Kestrel
2018-03-14 08:17:07 -07:00
Andrew Stanton-Nurse fb6121399c
Remove support for binary over SSE and add transfer format to negotiation (#1564) 2018-03-13 14:29:32 -07:00
Pavel Krymets 4a4efe0f39
Update to new corefx (#1561) 2018-03-08 14:23:20 -08:00
David Fowler c8d4cf689f
Tackling some low hanging performance fruit (#1470)
* Tackling some low hanging performance fruit
- Use native Memory/Span APIs on Stream and WebSocket in .NET Core 2.1
- Remove double copying in formatters
- Implemented custom HttpContent over ReadOnlyBuffer<byte>
2018-02-20 13:50:31 -08:00
Andrew Stanton-Nurse b61dc35ee6
fix #1199 by suppressing ODE in received callback (#1395) 2018-02-01 15:08:52 -08:00
Pawel Kadluczka 66ab939cff Making HttpConnection restartable (C#) (#1147)
🎉
2017-12-12 10:08:42 -08:00
Andrew Stanton-Nurse a8330067c4
Implement #1157 by adding client timeout for C# client (#1165) 2017-12-07 14:54:41 -08:00
BrennanConroy 792745ad98 React to CoreFxLab packages (#998) 2017-11-13 15:05:35 -08:00
Mikael Mengistu 1a21fd49b1
Changing the Closed Event to be a Task (#1080) 2017-11-09 17:51:13 -08:00
Mikael Mengistu eec6b4f2f5 Removing Connected event from TestConnection (#1055) 2017-10-24 23:23:56 -07:00
Mikael Mengistu 04d4da2987 Replace Received Event with OnReceived (#1006) 2017-10-18 17:10:51 -07:00
Pawel Kadluczka 5ad5f36f88 Changing length prefixing to separator for JSON C# 2017-08-18 09:50:45 -07:00
Pawel Kadluczka a0e490e549 Enabling binary protocols over text transports 2017-08-08 12:11:55 -07:00
Pawel Kadluczka 0ebd33a25c Plumbing TransferMode on the client side 2017-07-14 10:45:28 -07:00
Mikael Mengistu d68de2b5ea Make Client Side Event Handlers Async (#610) 2017-06-28 22:39:59 -07:00
David Fowler 6332e98d03 Remove Try from Write methods (#614)
- We write to a Stream so it should never fail (it could throw
but that's not new).
2017-06-28 21:53:23 -07:00
Pawel Kadluczka f8d91b54d4 MsgPack end-to-end
Plugging in MsgPack protocol
Adding negotiation message to hub protocol
2017-06-27 18:40:55 -07:00
Mikael Mengistu 13ef35fa79 Changed the handlers to be Func<object[], Task> (#578) 2017-06-27 10:14:58 -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 12917ef0e9 Re-layer the .NET Client into Http and non-Http (#544)
* Re-layer the .NET Client into Http and non-Http
- Moved IConnection to Sockets.Abstractions and removed
HttpConnection and TransportType dependency.
- Renamed Sockets.Client to Sockets.Client.Http
- Renamed Sockets.Common to Sockets.Common.Http
- Renamed Connection to HttpConnection
- Removed HTTP dependency from HubConnection
- Removed tests that were testing connection logic in HubConnection

#518
2017-06-09 08:58:54 -10:00
David Fowler 5f6736a82f Removed unused parameter 2017-06-06 10:29:56 -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
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
Andrew Stanton-Nurse 263dd0e4fe Fix #324 by adding streaming support to the server (#461) 2017-05-31 09:10:20 -07:00
Pawel Kadluczka 4bb9721d39 Adding strongly typed Invoke and On overloads
See: #311
2017-05-19 09:47:16 -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