Stephen Halter
fde0f6b2fc
Add an option to Kestrel to disable threadpool dispatching
2017-02-28 10:14:58 -08:00
Pavel Krymets
990e2a8dc4
Use pass through connection adapter instead of ssl for max buffer size tests ( #1391 )
2017-02-23 08:04:43 -08:00
David Fowler
ba549502e1
Use the IThreadPool as the ReaderScheduler ( #1372 )
...
- This is what socket input did, also using
ThreadPool.QueueUserWorkItem is better than Task.Run for this
scenario and avoids a bunch of overhead.
2017-02-21 21:09:23 -08:00
Stephen Halter
2351c1b558
Create a direct way to configure Kestrel endpoints
...
- Replace endpoint configuration via .UseUrls() or --server.urls with Listen*
methods on KestrelSerrverOptions.
- Replace IConnectionFilter with IConnectionAdapter which no longer exposes
ServerAddress via a context.
- Simplify libuv Listener classes
- Support systemd socket activation
- Add docker-based test for systemd socket activation to be run on Travis
2017-01-06 17:37:58 -08:00
Cesar Blum Silveira
51ecbd7949
Add benchmarks for Frame writes.
2016-12-13 11:33:56 -08:00
Ben Adams
8ce47fb8b6
Move perf, share code
2016-11-21 22:48:57 +00:00
Stephen Halter
194059a198
Implement Begin/End Read/Write methods in LoggingStream
...
- This allows the reads and writes from SslStream to be logged on desktop .NET
2016-11-04 21:38:57 -07:00
Stephen Halter
b3aca0413c
Avoid zero-length writes to flush connection filter stream
...
- This works around a zero-length write bug in SslStream.
- We already assume connection filter streams auto flush.
#1195
2016-11-04 15:43:35 -07:00
Cesar Blum Silveira
375e8b7022
Change context relationships from inheritance to composition.
2016-09-27 11:53:06 -07:00
Cesar Blum Silveira
1a273f5a34
Improve keep-alive timeout.
...
- Track time more accurately
- Control timeout in Connection instead of Frame
2016-09-14 20:57:16 -07:00
Stephen Halter
39bd49ea1a
Avoid blocking the MockLibuv loop with test code
...
- This allows for a graceful shutdown with dotnet test -Parallel None
- By default, the xunit synccontext will dispatch automatically off
the KestrelThread, but it's best not to rely on this behavior.
2016-09-12 11:06:29 -07:00
Pavel Krymets
c777a9efea
Use TaskCache class from Microsoft.Extensions.TaskCache.Sources ( #1089 )
...
Instead of Task.FromResult(0)
2016-09-09 15:57:33 -07:00
Cesar Blum Silveira
f2085b1968
Add keep-alive timeout ( #464 ).
2016-09-06 12:48:47 -07:00
Cesar Blum Silveira
19f8958fa8
Move TestServer to shared directory.
2016-09-06 12:47:24 -07:00
Stephen Halter
1ecef8094a
Make Kestrel's response buffer limit configurable
2016-08-30 16:01:42 -07:00
Stephen Halter
acfcafb6e1
Ensure MockLibuv.OnPostTask doesn't complete too early
2016-08-29 20:53:00 -07:00
Stephen Halter
0742d113be
Make all calls to ThreadPool.QueueUserWorkItem through IThreadPool
...
- This allows SocketOutputTests to cause QUWI to exec synchronously
- To avoid allocations, the logger can't be captured making it "unsafe"
2016-08-29 20:52:47 -07:00
Stephen Halter
4587a0fc95
Prevent possible deadlocks when using MockLibuv.OnPostTask
2016-08-29 12:14:19 -07:00
Stephen Halter
7bd30ea693
Log all startup errors in KestrelServer
2016-08-18 14:52:26 -07:00
Stephen Halter
8f4cc3003b
Improve SocketOutputTests
...
- This should increase reliability/determinism by removing timeouts.
2016-08-15 10:58:32 -07:00
Cesar Blum Silveira
5181e4196c
Trace call to _uv_unsafe_async_send in MockLibuv.
2016-08-09 18:26:10 -07:00
Stephen Halter
9727a4db86
Improve the performance of connection filters
...
- Buffer connection filter input less by using ProducingStart/Complete
- Simplify FilteredStreamAdapter
2016-08-03 16:45:39 -07:00
Cesar Blum Silveira
3c0e0f8d88
Always throw same exception type on read after connection error ( #975 ).
2016-07-21 16:33:56 -07:00
Andrew Stanton-Nurse
09f5be1434
fix #909 by moving most classes to Internal ns
2016-06-03 14:14:21 -07:00
Stephen Halter
07744e75d9
Gracefully handle connection close in SocketOutput.ProducingComplete
2016-06-02 16:54:00 -07:00
Stephen Halter
2d229e8980
Allow a maximum of 3 concurrent uv_write operations per connection
...
- Keep logic to prevent unnecessary calls to KestrelThread.Post
- This partially reverts commit 480996433e .
2016-06-02 16:52:06 -07:00
Cesar Blum Silveira
6d3a416f0e
Test code nitpicks.
2016-05-27 15:02:32 -07:00
Cesar Blum Silveira
3f4e2323f4
Throw when setting Frame.StatusCode or Frame.ReasonPhrase after response has already started ( #805 ).
2016-05-24 16:32:54 -07:00
Cesar Blum Silveira
925d8e0200
Always cache headers and streams across frames ( #754 ).
2016-05-20 16:16:19 -07:00
Cesar Blum Silveira
f29dd60999
Fix connection termination issues when using connection filters ( #737 , #747 ).
...
- If we're done before the client sends a FIN, force a FIN into the raw
SocketInput so the task in FileteredStreamAdapter finishes gracefully
and we dispose everything in proper order.
- If there's an error while writing to a stream (like ObjectDisposedException),
log it once and prevent further write attempts. This means the client closed
the connection while we were still writing output.
- This also fixes a bug related to the point above, where memory blocks were
being leaked instead of returned to the pool (because we weren't catching
the exception from Write()).
2016-04-19 22:04:33 -07:00
BrennanConroy
109c56713a
React to logging changes
2016-04-01 11:53:47 -07:00
Stephen Halter
f0e438f65f
Remove IKestrelTrace.ApplicationError overload without connection id
...
Add test verifying that exceptions thrown from application tcs continuations
run by the LoggingThreadPool don't get logged as general exceptions.
2016-03-30 11:13:13 -07:00
Ben Adams
48d3c63f70
TestHelper classes for shared types
2016-02-26 23:48:52 +00:00
Cesar Blum Silveira
f21cb128e8
Handle 0-byte reads correctly ( #520 ).
2016-02-26 15:21:11 -08:00
Stephen Halter
bc56d11d8c
Set IsBackground property to true on libuv Threads for non-debug builds
...
- If libuv doesn't shutdown as expected, the process will still stop. Thanks @benaadams!
- Address other minor PR feedback.
2016-02-17 16:40:05 -08:00
Stephen Halter
f4bb8d5eff
Verify that memory pool blocks aren't leaked in tests
2016-02-17 16:05:34 -08:00
Ben Adams
00b8a13b55
Merge+rename+rename resolve
2016-01-26 11:33:14 +00:00
Stephen Halter
735c0fbbef
Added new test to verify failed writes complete all pending write tasks
...
- Changed MockLibuv to never fall back to real libuv methods.
- Fixed EngineTests.ConnectionCanReadAndWrite
2016-01-23 10:17:07 +00:00
N. Taylor Mullen
b062f851dc
Rename AspNet 5 file contents.
...
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:23:51 -08:00
N. Taylor Mullen
3cfe2f3070
Rename AspNet 5 folders and files.
...
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:23:44 -08:00