youyuanwu / winasio Goto Github PK
View Code? Open in Web Editor NEWwindows extension for boost-asio
License: Boost Software License 1.0
windows extension for boost-asio
License: Boost Software License 1.0
More details: https://learn.microsoft.com/en-us/windows/win32/http/versioning-in-http-2-0
HTTPAPI_LINKAGE ULONG HttpAddUrl(
[in] HANDLE RequestQueueHandle,
[in] PCWSTR FullyQualifiedUrl,
PVOID Reserved
);
but https://learn.microsoft.com/en-us/windows/win32/api/http/nf-http-httpaddurl
says
Starting with HTTP Server API Version 2.0, applications should call [HttpAddUrlToUrlGroup](https://learn.microsoft.com/en-us/windows/desktop/api/http/nf-http-httpaddurltourlgroup) to register a URL; HttpAddUrl should not be used.
http_connection
, winnet::http::simple_request
and winnet::http::simple_response
are exposed for ease of use for a server application.
Currently http server to user logic is handled by a handler function:
winasio/tests/http/http_server_test.cpp
Line 47 in 3ec6862
We need to improve and finalize this API.
One example of high level API is this: https://github.com/nghttp2/nghttp2-asio
https://www.nghttp2.org/documentation/libnghttp2_asio.html
Right now the body is always read 10 bytes at a time.
We should let the user pass a hint to how long the body would be, and read it at once.
Or explorer if there is a way to query the body length in kernel before reading.
Currently the high level API is:
winasio/tests/winhttp/winhttp2_test.cpp
Line 42 in 3ec6862
Which is based on winnet::winhttp::payload
, and require user to supply every arg.
This API layout needs to be finalized.
shutdown the request queue first and then shutdown the asio io service.
Use this function: https://learn.microsoft.com/en-us/windows/win32/api/http/nf-http-httpshutdownrequestqueue
Provide functionalities to read http trailers
There are various debug boost log lines all across the implementation files, and it is useful for debugging while developing this lib.
When doing benchmarks, such logs may degrade performance even though the log filter is specified.
So debugs should be macro-ed out our wrapped in #ifdef lines.
When there are high number of connections, the requests are slow and some connections timed out.
Maybe the acceptor loop needs to limit the max accepted connections.
Error is not yet handled in the callback:
Case WINHTTP_CALLBACK_STATUS_REQUEST_ERROR
needs to be added and callback needs to be invoked with error code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.