Comments (7)
Hi,
This is actually not really part of official Owin standart, so it would be nice is you would add it if you need it :-)
I think all changes should be limited to https://github.com/Bobris/Nowin/blob/master/Nowin/OwinServerFactory.cs
and
https://github.com/Bobris/Nowin/blob/master/Nowin/OwinKeys.cs
from nowin.
I'd really like to give this a try (or even better implement server.OnDispose as they are mentioned in the official specification: https://github.com/owin/owin/blob/master/CommonKeys.md). I've looked at the code for some while now, and I struggle a bit to find the right place(s) to put that in.
My question: In my understanding the CancellationToken should be reachable via both IAppBuilder.Properties and the request environment. Is this a correct interpretation of the specification?
from nowin.
It could be in that capabilities
dictionary. You get them in each request, but I don't think it should be usefull there for anything (https://github.com/Bobris/Nowin/blob/master/Nowin/OwinEnvironment.Generated.tt#L29), you already have owin.CallCanceled
from nowin.
And how to find out that server is disposing just subscribe in https://github.com/Bobris/Nowin/blob/master/Nowin/OwinServerFactory.cs#L79
from nowin.
server.OnInit and server.OnDispose have been standardized. The microsoft key is mentioned as a backward compatibility thing. See owin/owin#27
from nowin.
@serialseb Problem is that Nowin is just server not host or builder, so I am no sure to which Dictionary I should place this (in per request it would be for sure useless. If you know about some sample implementation I could learn from how to do it, I am also interested.
from nowin.
startup properties exist during wireup (if you support BuildFunc), and contain all the common keys "available at startup", as per CommonKeys. The env contains startup keys and the http request associated keys.
In other words, anything that ought to be exposed as a startup key ought to be in its own dictionary, and any key per request / response ought to be in the env dictionary, which contains all the startup keys.
The upcoming 1.0.1 spec will clarify those things.
from nowin.
Related Issues (20)
- ObjectDisposedException in SaeaLayerCallback.IoCompleted HOT 2
- Force client certificate HOT 5
- Weird hang after pressing f5 repeatedly. HOT 7
- Periodically getting this exception HOT 7
- Deadlock on large request body HOT 3
- Nowin app hangs using certificate for https after the first successful connection HOT 3
- Nowin doesn't (seem) to automatically urldecode the request url HOT 4
- websockets timeout with signalr HOT 7
- Inconsistent WebSocket Upgrade response. HOT 2
- WebSockets: Ping/Pong frames should be handled even if there is no receive
- WebSockets: frames with fragmented header are causing halt in websocket processing HOT 3
- Mechanism to specify keep-alive timeout HOT 1
- 是否有新版本更新? HOT 3
- SSL + libcurl: connection seems dead
- Nowin implements IOwinRequest.Body.Length incorrectly HOT 1
- corruption/threading issues in transport layer? HOT 3
- Is it possible to provide a background worker sample? HOT 3
- keep-alive never used HOT 1
- ERR_SSL_VERSION_INTERFERENCE with Chrome on android HOT 3
- A recommendation to archive this project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nowin.