Questions tagged [overlapped-io]

138 questions
0
votes
3 answers

Is Overlapped I/O used on the client side also?

I think that Overlapped I/O was invented to be used on the server side, mainly to be able to handle thousands of clients. So I do not think that there is any reason to use it on the client side. is my assumption correct?
John
  • 1,049
  • 1
  • 14
  • 34
0
votes
1 answer

GetOverlappedResults blocks with bWait = false

GetOverlappedResults() does not return at all. I ran the simple example bellow and when there is an IP address change in a network interface the manual reset event gets set and I can see "IP Address table changed.." output, but…
Chris
  • 1,213
  • 1
  • 21
  • 38
0
votes
1 answer

Cancel WaitCommEvent for overlapped serial I/O

I'm handling a non-standard modem via serial port in an overlapped manner. Besides reading from and writing to the telecommunication line, I have to check the control lines like CTS and DSR using the WaitCommEvent() function. DWORD EvtMask; ///…
Wolf
  • 9,679
  • 7
  • 62
  • 108
0
votes
2 answers

WSARecv hook: prevent packet from being recieved by the executable

I am working on dll which hooks winsock2 functions, using C++ and detours. My goal is to modify TCP traffic that goes from and to the original executable. At some point, I need to stop certain packet delivery (so that original executable has no idea…
splattru
  • 608
  • 1
  • 9
  • 19
0
votes
1 answer

ReadFileEx, variable length - a few questions

I'm trying to read from stderr of a child process. The data is lines of text created with sprintf(stderr, "some debug info\n"). I'm using ReadFileEx with a completion routine. I don't know how many lines of text or how long each line will be. So,…
johnnycrash
  • 5,184
  • 5
  • 34
  • 58
0
votes
1 answer

Data align when socket recv() then written to file using overlapped_io with FILE_NO_BUFFERING_FLAG

I'm writing a C++ program that simply receives data from another computer and writes the data into an SSD RAID with high throughput (about 100MB/s since GbEthernet). I have set up 2 overlapped_io each, which are received from Ethernet and written to…
silenuszhi
  • 15
  • 3
0
votes
1 answer

How to prevent an I/O Completion Port from blocking when completion packets are available?

I have a server application that uses Microsoft's I/O Completion Port (IOCP) mechanism to manage asynchronous network socket communication. In general, this IOCP approach has performed very well in my environment. However, I have encountered an…
charunnera
  • 357
  • 4
  • 16
0
votes
0 answers

Multiple files reads and elaboration with OVERLAPPED operations (and IOCP?)

I'm trying to figure out a way to improve a C++ Win32 program I've made which basically recursively traverses a given folder and for every given file computes an hash ( let's say MD5, but it could be any sort of CPU expensive computation ). Since…
Simone Margaritelli
  • 4,584
  • 10
  • 45
  • 70
0
votes
1 answer

Reference count for OVERLAPPED structure

I found an article i find quite interesting. There is just one thing i cannot wrap my head around. (http://molecularmusings.wordpress.com/2011/08/31/file-system-part-1-platform-specific-api-design/) The author describes a File class which is able…
puelo
  • 5,464
  • 2
  • 34
  • 62
0
votes
1 answer

Coding pattern for dependant overlapped io in windows

I'm a linux programmer and recently involved in porting an epoll based client with two file descriptor written in c to windows. As you know,in linux using epoll or select (I know windows supports select, but its not efficient at all) you can block…
madz
  • 1,803
  • 18
  • 45
0
votes
1 answer

Using overlapped structure for callback?

I have my own overlapped structure for asynchronous IO using IO Completion ports. Now i get notification for read / write completions. Can i pass a CALLBACK function as a parameter in the overlapped structure? This will allow me to specify various…
Desert Ice
  • 4,461
  • 5
  • 31
  • 58
0
votes
1 answer

Asynchronous I/O callback method concurrency

I've implemented Asynchronous I/O with a callback where I'm worried about concurrency. I contest to you that since I'm always working with the same file and the OS file physical I/O is fundamentally a synchronous operation then I won't need a lock…
user152949
0
votes
1 answer

Boost asio async vs blocking reads, udp speed/quality

I have a quick and dirty proof of concept app that I wrote in C# that reads high data rate multicast UDP packets from the network. For various reasons the full implementation will be written in C++ and I am considering using boost asio. The C#…
Dolphin
  • 4,655
  • 1
  • 30
  • 25
0
votes
1 answer

Event triggered Window Message

Is there a way to generate a Window message when an Event is set? I want to setup an overlapped I/O operation, so it is not blocking, but I would like not to poll its status. I know I can use a thread, but I would only need it for this operation. …
Mike
  • 1,760
  • 2
  • 18
  • 33
-1
votes
1 answer

Windows overlapped IO actually blocks

I'm trying Windows overlapped IO but I can't seem to get it to work asynchronously. I've compiled and run the program below but it never prints anything, it just completes silently. I've read small reads could become synchronous, that's why I…
Lutopia
  • 113
  • 8
1 2 3
9
10