Comments (6)
Hello @linhaojun857 ,
wepoll
is a possible solution.
The disadvantage of it is that we have to add a 3rd party dependency to the main oatpp's main module -
what we were trying to avoid all this time.
I was planing to implement IOEventWorker
using Windows I/O Completion Ports
. Just have to find time to do this.
If you will you can start investigating possible ways to implement it IOEventWorker
using Windows I/O Completion Ports
I'll provide all necessary assistance.
Regards,
Leonid
from oatpp.
Hello @linhaojun857 ,
wepoll
is a possible solution. The disadvantage of it is that we have to add a 3rd party dependency to the main oatpp's main module - what we were trying to avoid all this time.I was planing to implement
IOEventWorker
using WindowsI/O Completion Ports
. Just have to find time to do this. If you will you can start investigating possible ways to implement itIOEventWorker
using WindowsI/O Completion Ports
I'll provide all necessary assistance.Regards, Leonid
@lganzzzo I think I can do it
from oatpp.
@lganzzzo After today's attempts, I find it quite difficult to implement EventWorker
using iocp
. Because iocp
reads and writes the socket asynchronously
, it cannot listen to events like epoll and call the suspended coroutine function in EventWorker synchronously
. My current thinking is, In the setCoroutineEvent
function, determine the IOEventType of the action
. If it is IO_EVENT_READ
, call the WSARecv
function to post an IO request to the iocp. If it is IO_EVENT_WRITE
, Call the WSASend
function to post an IO request to the iocp, but encounter a problem, the delivered io operation can not find a good way to update the position
in the upper buffer
when reading and writing to the socket, I'd like to ask if you have any good ideas.
from oatpp.
@lganzzzo I think i can refer to this https://github.com/golang/go/blob/master/src/runtime/netpoll_windows.go
from oatpp.
Hello @linhaojun857 ,
@lganzzzo After today's attempts, I find it quite difficult to implement EventWorker using iocp. Because iocp reads and writes the socket asynchronously, it cannot listen to events like epoll and call the suspended coroutine function in EventWorker synchronously. My current thinking is, In the setCoroutineEvent function, determine the IOEventType of the action. If it is IO_EVENT_READ, call the WSARecv function to post an IO request to the iocp. If it is IO_EVENT_WRITE, Call the WSASend function to post an IO request to the iocp, but encounter a problem, the delivered io operation can not find a good way to update the position in the upper buffer when reading and writing to the socket, I'd like to ask if you have any good ideas.
Yeah, I was expecting such kind of problems with IOCPs...
Do you have your code pushed somewhere?
Or I can create a branch to play with it
from oatpp.
Hello @linhaojun857 ,
@lganzzzo After today's attempts, I find it quite difficult to implement EventWorker using iocp. Because iocp reads and writes the socket asynchronously, it cannot listen to events like epoll and call the suspended coroutine function in EventWorker synchronously. My current thinking is, In the setCoroutineEvent function, determine the IOEventType of the action. If it is IO_EVENT_READ, call the WSARecv function to post an IO request to the iocp. If it is IO_EVENT_WRITE, Call the WSASend function to post an IO request to the iocp, but encounter a problem, the delivered io operation can not find a good way to update the position in the upper buffer when reading and writing to the socket, I'd like to ask if you have any good ideas.
Yeah, I was expecting such kind of problems with IOCPs... Do you have your code pushed somewhere? Or I can create a branch to play with it
@lganzzzo Because I haven't found a suitable way, I haven't finished the code yet. I will keep thinking about the solution to this problem
from oatpp.
Related Issues (20)
- Enhance Deserializer's "Error. Unknown field"
- How can I use OATPP to handle web browser request download file. HOT 2
- Memory leak in Object mapping HOT 1
- Deserialize json when not include required field only gives error when the field is specified as null
- [Question] readBodyIntoDTO when there's a list in the body
- API question
- how to make dynamic sql use oatpp-sqlite HOT 1
- LazyStringMapTemplate::get returns Nullptr wich is not in oatpp.io Documentation
- Please add support for CMake 3.16
- Cannot test if required integer query parameter is empty
- [Question] Is it possible during compilation to write out the generated oas-3.0.0.json file?
- May memory leak
- How should I make my process send requests to the target when using OATPP HOT 4
- Stack corruption issue in ConnectionProvider.cpp
- Can not build project successfully
- Is it possible make oatpp::network::tcp::client::ConnectionProvider support bind client IP?
- specific async pattern implementation query HOT 4
- io_uring support request HOT 1
- Compilation error on Windows with MinGW
- Facing linker issue (undefined reference to `oatpp::base::Environment::getComponent) in windows using mingw gcc compiler
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 oatpp.