sgifford has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to write a short serial-to-Ethernet adapter program for Windows, using Win32::SerialPort on ActiveState perl on Win2K.
I've got it basically working by alternately checking if any data is available on the socket, then if any data is available on the serial port. To avoid a timeout in the application I'm using this with, I have to use very short timeouts, and I end up polling several times a second.
Is there a better way to do this? On Unix, I would just use select on the socket filehandle and the tty filehandle, but unfortunately, Win32::SerialPort doesn't return a filehandle that I can select on, and Windows select only works with sockets.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing a serial-to-Ethernet adapter with Win32::SerialPort
by BrowserUk (Patriarch) on May 11, 2004 at 01:32 UTC | |
by sgifford (Prior) on May 14, 2004 at 19:33 UTC | |
by BrowserUk (Patriarch) on May 14, 2004 at 20:13 UTC | |
|
Re: Writing a serial-to-Ethernet adapter with Win32::SerialPort
by tachyon (Chancellor) on May 11, 2004 at 00:18 UTC |