Questions tagged [overlapped-io]
138 questions
1
vote
0 answers
What scenarios would NativeOverlapped or System.Threading.Overlapped be useful in PFX IOTaskScheduler?
I'm looking at the PFX team's Parallel Extensions Extras DLL and see an IOTaskScheduler that uses NativeOverlapped, and System.Threading.Overlapped methods.
Since there isn't much documentation on when each extension is useful, it is up to me to…

makerofthings7
- 60,103
- 53
- 215
- 448
1
vote
2 answers
Async IO across processes
All:
I am writing a logging solution. One of the available log endpoints is a text file. Suppose I wanted to write to that file from multiple processes: I could open it shared, and use a named mutex to control concurrent access to the file…

JMarsch
- 21,484
- 15
- 77
- 125
1
vote
1 answer
How to get the number of bytes read from a pending or aborted overlapped ReadFile operation
One can use the GetOverlappedResult() function to get the number of read bytes from a successfull overlapped (asynchronous) ReadFile() operation.
I can't find a way to get the number of read bytes while the operation is still pending or after it has…

greydet
- 5,509
- 3
- 31
- 51
1
vote
1 answer
Overlapped IO in wxWidgets application
I'm working on a Windows-only wxWidgets GUI application that shall receive asynchronous notifications from a service process via a named pipe. I would like to avoid spawning a separate thread for pipe handle monitoring. Hence, I'm thinking about…

Roman Dmitrienko
- 3,375
- 3
- 37
- 48
1
vote
1 answer
Serial port and handling errors during overlapped I/O operations
I've been doing serial communications lately so I prepared a class being a simple interface to all those Windows API functions responsible for reading, writing, etc. All I/O operations inside this class are handled asynchronously.
Before I go to my…

Mariusz Schimke
- 3,185
- 8
- 45
- 63
1
vote
4 answers
using overlapped I/O conflicts with c++ D'tor
I'm writing a single-client (for now) server that has a main loop that interpert client request , and dispatces a proper handler.
for some taks, I'll like to use MS overlapped I/O (it's for windows only) .
in one of them, I want to read from a file…

Enri Lum
- 11
- 1
1
vote
0 answers
Potential kind of asynchronous (overlapped) I/O implementation in Windows
I would like to discuss potential kind of asynchronous (Overlapped) I/O implementations in Windows, because there are many ways to implement this.
Overlapped I/O in Windows provides the ability to process data asynchronously, ie the execution of the…

bkausbk
- 2,740
- 1
- 36
- 52
0
votes
1 answer
Why would an Overlapped call to recv return ERROR_NO_MORE_ITEMS(259)?
I did a few tests with an I/O-Completion port and winsock sockets.
I encountered, that sometimes after I received data from a connection and then adjacently call WSARecv again on that socket it returns immediately with the error 259…

Juarrow
- 2,232
- 5
- 42
- 61
0
votes
0 answers
Why does the callback function in WSARecv() not work?
I'm having a hard time implementing the client to connect with the IOCP server in an asynchronous manner.
Sending packets from the client to the server using WSASend worked normally.
Connection and Packet send Code - Client
SOCKADDR_IN…

MeoH
- 13
- 4
0
votes
1 answer
WinSock: How to properly time out receive using overlapped I/O
Problem criteria:
my service is Windows-only, so portability is not a constraint for me
my service uses threadpools with overlapped I/O
my service needs to open a connection to a remote service, ask a question and receive a reply
the remote service…

rguilbault
- 553
- 1
- 5
- 17
0
votes
0 answers
Can a Windows named pipe created in OVERLAPPED (async) mode be used for sync communications as well?
I have a Named pipe process that uses Async communication, it is created by calling CreateNamedPipe with FILE_FLAG_OVERLAPPED, on the client process the pipe is opened using CreateFile with the same flag and connected with ConnectNamedPipe.
My…

joepol
- 744
- 6
- 22
0
votes
0 answers
How to use OVERLAPPED to write data at specific offset (win32 programming)
(I'm not native English speaker so sorry for potential mistake :p)
I want to write a Windows tool that can accelerate big files copying just like FastCopy. But get stuck at the very first step: Write data to specific offset of a file via OVERLAPPED…

play_as_megumin
- 11
- 1
0
votes
0 answers
Windows Named Pipe Client in Overlapped mode
I am using Named Pipes to communicate between two processes running in Windows. This is implemented in c++ using the Win32 API. The server pipe is implemented asynchronously using an overlapped structure. Can the same can be implemented on the…

user5265160
- 409
- 1
- 8
- 19
0
votes
1 answer
UDP server consuming high CPU
I am observing high CPU usage in my UDP server implementation which runs an infinite loop expecting 15 1.5KB packets every milliseconds. It looks like below:
struct RecvContext
{
enum { BufferSize = 1600 };
RecvContext()
{
…

Sayantan Ghosh
- 998
- 2
- 9
- 29
0
votes
0 answers
Capture stdout of child process with overlapped I/O
I want to spawn a child process and capture its stdout (and stderr) using overlapped I/O without using threads. Here's my current knowledge of all the stars that must align in order to achieve that, i.e. here's the recipe:
Set an inheritable handle…

capr
- 149
- 1
- 8