I'd spawn a thread to handle the serialport, and use a Thread::Queue to communicate between that thread and the main thread handling the socket.
You should then be able to use blocking IO on the serial port to provide timely servicing of that without the need to poll.
Using a combination of select on the socket, and $Q->pending() will allow the main thread to manage both the socket and input from the serialport (via the queue) on demand.
In reply to Re: Writing a serial-to-Ethernet adapter with Win32::SerialPort
by BrowserUk
in thread Writing a serial-to-Ethernet adapter with Win32::SerialPort
by sgifford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |