Stephen Halter
6d3e5d3bf2
Merge branch 'benaadams/fastpath-header-enumerator' into dev
2015-09-28 12:21:58 -07:00
Stephen Halter
f0137b7b9e
Bind to specific IP addresses if provided with any
...
This still only applies to IPv4.
#98
2015-09-25 16:26:01 -07:00
Ben Adams
1718b69f22
Fast path header enumerator
...
Use strongly typed enumerable as interface's allocates.
2015-09-26 00:16:42 +01:00
damianedwards
a7b65efa75
CR feedback
2015-09-25 14:59:47 -07:00
damianedwards
3c2408db68
Fix tests after rebase
2015-09-25 14:59:47 -07:00
damianedwards
7c46b2bd3b
Use a timer to generate the value for the Date header in responses:
...
- Doing it on each request is expensive
- The Timer is started when the first request comes in and fires every second
- Every request flips a bool so the Timer knows requests are coming in
- The Timer stops itself after a period of no requests coming in (10 seconds)
- #163
2015-09-25 14:59:47 -07:00
Louis DeJardin
318f3b7145
Changing Trace.Assert to Debug.Assert
...
* Also Debug.Assert for unreturned memory blocks
2015-09-25 13:01:54 -07:00
Louis DeJardin
0adbbd0217
Using the well-known-header field without checking set bit
2015-09-25 12:49:29 -07:00
Stephen Halter
dc902f5fc4
Update SocketOutput to not call QueueUserWorkItem unnecessarily
2015-09-25 12:49:28 -07:00
Louis DeJardin
789d5b3595
Writes which are not immediate always return completed tasks
...
They must always be followed with Writes which are immediate, and
returning an incomplete task put them in a state where the callback
might not have been initiated.
2015-09-25 12:49:27 -07:00
Louis DeJardin
5e678fdbaa
Adding volatile keyword to stopping boolean
2015-09-25 12:49:27 -07:00
Louis DeJardin
99fc7e4e50
Moving the Start/Stop logic into Frame.
...
Also formalizes the relationship between the function's Task and
how it relates to graceful shutdown. Specifically how it relates
to finishing the requests currently in progress.
2015-09-25 12:49:26 -07:00
Louis DeJardin
c424b8437c
Renaming based on PR feedback
2015-09-25 12:49:24 -07:00
Louis DeJardin
844c791b16
Processing function should return Task
2015-09-25 12:49:23 -07:00
Louis DeJardin
091084cfe2
Refactoring MemoryPool class locations
...
Moving Iterator out into its own file rather than being a nested class
Moving pool classes into Infrastructure namespace instead of Http
2015-09-25 12:49:23 -07:00
Louis DeJardin
13defc5a32
Initialize Memory2 in ListenerContext
...
Better than initializing from multiple other classes
2015-09-25 12:49:22 -07:00
Louis DeJardin
5ba1b9fb3c
Secondary listeners need to allocate their own memory pool
2015-09-25 12:49:21 -07:00
Louis DeJardin
6db3d9e645
Using specific exception types
2015-09-25 12:49:21 -07:00
Louis DeJardin
76b528e1d2
Adding comments to MemoryPool classes
2015-09-25 12:49:20 -07:00
Louis DeJardin
ff0affe34d
Removing _frameTask and fixing Task.Run argument
2015-09-25 12:49:19 -07:00
Louis DeJardin
30ec2cb0b1
Harden framing epilog
...
* Connection no longer needes Frame's processing Task
* Any exceptions from unusual processing is logged
2015-09-25 12:49:19 -07:00
Louis DeJardin
28250d9981
Providing Path to application
2015-09-25 12:49:18 -07:00
Louis DeJardin
04f6446a50
Updates for PR feedback
2015-09-25 12:49:18 -07:00
Louis DeJardin
d3a87c4c14
Removing MessageBodyExchanger base class
2015-09-25 12:49:17 -07:00
Louis DeJardin
52dc37eae7
Fixing a header parsing bug
...
When request header data arrives with \r\n split across packets
2015-09-25 12:49:16 -07:00
Louis DeJardin
e5a3bda3a2
Progress on flow control
...
* Dealing with race conditions
* Reworking iterator methods
* Shutdown and Close need to be passed throught the write-behind mechanism
2015-09-25 12:49:15 -07:00
Louis DeJardin
4193c92ba7
Fixing merge conflicts
2015-09-25 12:49:15 -07:00
Louis DeJardin
1f6aaebeda
Changing flow control for incoming data
...
SocketInput is now awaitable
Input buffers are slab-allocated and pinned from large object heap
Request frame parsing is offloaded from libuv thread
2015-09-25 12:49:14 -07:00
Louis DeJardin
557f6d6993
Refactoring response control flow
...
- Bring through both sync and async execution paths
- Remove callback pattern from from and socketoutput write calls
2015-09-25 12:47:51 -07:00
Stephen Halter
47323a88e1
Surface errors from Listener.StartAsync better
...
If CreateListenSocket fails, surface the original error instead of throwing a
NullReferenceException from Listener.Dispose().
#185
2015-09-16 18:19:01 -07:00
Stephen Halter
2d01f2752b
Catch and log uv_accept errors
...
- This is also what is done by node.js
- "tcp, pipe: don't assert on uv_accept() errors (Ben Noordhuis)"
0685707bc6
2015-09-16 18:18:58 -07:00
Stephen Halter
f14af1f409
Don't swallow too many exceptions
...
- Swallowing too many exceptions can end up hiding issues in
Kestrel itself. It's better to let the process die.
- If we want to handle certain exceptions we should be as
specific as possible with our try/catch blocks.
2015-09-16 18:18:55 -07:00
Stephen Halter
1ebf98d40d
Log message style changes
...
- Disabled some log messages for possibly being too verbose.
- Don't log ConnectionReadFin when there is an error.
2015-09-10 11:41:25 -07:00
Stephen Halter
0ef096b41c
Increment connection id for logging
2015-09-10 11:41:22 -07:00
Stephen Halter
dc08062545
Merge branch 'drussilla/add-logging' into dev
...
Conflicts:
src/Microsoft.AspNet.Server.Kestrel/Http/Connection.cs
src/Microsoft.AspNet.Server.Kestrel/Http/ListenerSecondary.cs
2015-09-09 11:28:09 -07:00
Ivan Derevyanko
ac77c11211
Make ConnectionCallback static again.
2015-09-09 02:13:49 +02:00
Stephen Halter
2041e4d08b
Prevent pipes from being closed prematurely on OS X and Linux
...
This change fixes the in-process marshalling of TCP handles on Mac and Linux
that is used to support having multiple threads accepting connections from
multiple loops.
On these two platforms, the ReadStart callback somtimes gets called with a
status and pipe_pending_count equal to zero. Now when the status is zero
just exit the callback without closing the pipe.
This change more closely follows the example at
https://nikhilm.github.io/uvbook/processes.html#sending-file-descriptors-over-pipes
2015-09-08 16:21:45 -07:00
Ivan Derevyanko
a93a66fe7c
Replace Trace.WriteLine with ITraceLogger
2015-09-09 00:26:26 +02:00
Ivan Derevyanko
6d47227975
KestrelTrace refactored and added to the ServiceContext. Close aspnet/KestrelHttpServer#141
2015-09-05 18:17:17 +02:00
Kai Ruhnau
5ee80e0155
Fix bug #191 introduced by b25d2d9
2015-09-05 12:29:00 +02:00
Stephen Halter
f10c989d90
Add ServiceContext to make it easier to flow new services through ctors
2015-09-04 15:04:25 -07:00
Louis DeJardin
c50aec1729
Adding comments to meaningless field names
2015-09-02 21:14:18 -07:00
Louis DeJardin
5c7007a4e9
Fixing member field name
2015-09-02 20:37:11 -07:00
Louis DeJardin
0859d82d6b
Adding private keyword to private enums
2015-09-02 20:33:51 -07:00
Louis DeJardin
3bbb77f9d0
Alphabetizing using statements
2015-09-02 20:31:11 -07:00
Louis DeJardin
b25d2d9772
Continued updates for #184
...
* Reordering members
- Fields
- Constructors
- Properties
- EverythingElse
- NestedTypes
* Removing commented code
2015-09-02 20:08:54 -07:00
Louis DeJardin
2467cf2ade
Nested types must be last
2015-09-02 00:07:58 -07:00
Louis DeJardin
46604d68b3
Initial commit for style cleanup #184
...
* adding private keyword to fields
* one type per file
2015-09-01 22:25:51 -07:00
Stephen Halter
a919ea8d0a
Remove unnecessary listener interfaces
2015-08-31 10:46:46 -07:00
Stephen Halter
a9b8cfa582
Remove unnecessary use of generics in listeners
2015-08-31 10:46:40 -07:00