ACE_TAO icon indicating copy to clipboard operation
ACE_TAO copied to clipboard

Windows: Supporting Serial Port

Open TheGoesen opened this issue 2 years ago • 2 comments

Motivation: We use ace for communications using serial ports. We do get an error code 10038. 10038 socket error To my understanding this is caused by ACE using WASend, which simply doesnt work with Serial Ports. Implementation: Add a macro to force usage of the WriteFile which does work with Serial Ports. There may be better ways to do this, I am not a windows c programmer...

TheGoesen avatar May 17 '22 10:05 TheGoesen

Wouldn't this change slowdown the use case where you don't use a serial port and set this define? Just the fact that serial ports are used shouldn't slowdown all use cases

jwillemsen avatar May 18 '22 11:05 jwillemsen

Yes It would. I gave it some thought if it would make sense to dynamically check the pointer if it is something WASend supports but it appears to me that it would be counterproductive, as that would add more overhead, so the opposite of performance.

To me it seems a bit like: either you have a serial port usecase, than you don't care about performance, because the comport is slow as hell anyways. Or you don't use a comport, than you don't want additional overhead just because some dude has one. And how likely is it that you need to support a serial port and an ultra high performant tcp stack in the same application?...

I am not opposed to do this differently, I simply don't know how much and why and in which Situations WASend is relevantly better. If someone knows of an almost "free" way to check if the handle is something WASends supports, or a better way to deal with Serial Ports, I am all for it.

TheGoesen avatar May 18 '22 12:05 TheGoesen