Click here to Skip to main content
15,914,220 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Asynchronous overlapped I/O Pin
led mike14-Nov-07 6:30
led mike14-Nov-07 6:30 
GeneralRe: Asynchronous overlapped I/O Pin
racette14-Nov-07 8:54
racette14-Nov-07 8:54 
GeneralRe: Asynchronous overlapped I/O [modified] Pin
led mike14-Nov-07 10:49
led mike14-Nov-07 10:49 
GeneralRe: Asynchronous overlapped I/O Pin
racette14-Nov-07 11:13
racette14-Nov-07 11:13 
GeneralRe: Asynchronous overlapped I/O Pin
led mike14-Nov-07 11:45
led mike14-Nov-07 11:45 
GeneralRe: Asynchronous overlapped I/O Pin
racette14-Nov-07 11:54
racette14-Nov-07 11:54 
GeneralRe: Asynchronous overlapped I/O Pin
led mike15-Nov-07 4:29
led mike15-Nov-07 4:29 
GeneralRe: Asynchronous overlapped I/O Pin
racette16-Nov-07 7:29
racette16-Nov-07 7:29 
First of all, I realize I had a lack of knowledge on named pipes and asynchronous IO when I started coding both softwares.

I designed a solution where I would use one thread per pipe and use overlapped asynchronous IO.

I now know that it is not the way to do it.

Here is my new question:

Is there a difference, in terms of performance, to using one thread that does all the IO with overlapped structures compared to using one thread per pipe without using overlapped structures?

Note that I say 'overlapped structures' but I also mean creating the named pipes with or without FILE_FLAG_OVERLAPPED.

Anyway, I have rearranged my code so that I can use the overlapped structures or not use them by changing the value of a parameter I put in my config (.ini) file.

That being said, it looks like using or not using overlapped structures does not solve my problem.

My softwares can communicate with each other without any problem when I run them locally, but when I try to do it over a network, WriteFile returns with TRUE and says that 153268 bytes have been written, but on the other side, ReadFile returns TRUE and says it has read 4292 bytes. And its not like ReadFile reads what it can for the remainder of the timeslice so that sometimes it reads 2000 bytes, sometimes 3000 and sometimes 4292, no, its always 4292 bytes exactly.

Im baffled by this but I will continue to try to make it work.

Thanks to all you who are helping me.

Benjamin Racette
CAE software developer
racette@cae.com

GeneralRe: Asynchronous overlapped I/O Pin
led mike16-Nov-07 20:43
led mike16-Nov-07 20:43 
GeneralRe: Asynchronous overlapped I/O Pin
racette19-Nov-07 7:23
racette19-Nov-07 7:23 
GeneralRe: Asynchronous overlapped I/O Pin
led mike19-Nov-07 7:49
led mike19-Nov-07 7:49 
GeneralRe: Asynchronous overlapped I/O Pin
racette19-Nov-07 8:33
racette19-Nov-07 8:33 
GeneralRe: Asynchronous overlapped I/O Pin
racette19-Nov-07 8:49
racette19-Nov-07 8:49 
GeneralRe: Asynchronous overlapped I/O Pin
racette23-Nov-07 4:16
racette23-Nov-07 4:16 
GeneralRe: Asynchronous overlapped I/O Pin
led mike26-Nov-07 4:56
led mike26-Nov-07 4:56 
GeneralRe: Asynchronous overlapped I/O Pin
racette26-Nov-07 7:07
racette26-Nov-07 7:07 
GeneralRe: Asynchronous overlapped I/O Pin
racette26-Nov-07 7:09
racette26-Nov-07 7:09 
GeneralRe: Asynchronous overlapped I/O Pin
led mike26-Nov-07 8:27
led mike26-Nov-07 8:27 
GeneralRe: Asynchronous overlapped I/O Pin
racette26-Nov-07 10:18
racette26-Nov-07 10:18 
GeneralRe: Asynchronous overlapped I/O Pin
led mike26-Nov-07 10:45
led mike26-Nov-07 10:45 
GeneralRe: Asynchronous overlapped I/O Pin
Mark Salsbery14-Nov-07 12:07
Mark Salsbery14-Nov-07 12:07 
GeneralRe: Asynchronous overlapped I/O Pin
led mike15-Nov-07 4:55
led mike15-Nov-07 4:55 
GeneralRe: Asynchronous overlapped I/O Pin
Mark Salsbery15-Nov-07 7:47
Mark Salsbery15-Nov-07 7:47 
GeneralRe: Asynchronous overlapped I/O Pin
racette16-Nov-07 7:39
racette16-Nov-07 7:39 
AnswerRe: Asynchronous overlapped I/O Pin
Mark Salsbery14-Nov-07 6:10
Mark Salsbery14-Nov-07 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.