I patched the code of com2tcp to get a new option supporting bidirectional UDP instead of monodirectional (as I understood) TCP. The main argument for implementing this is to use this code as a virtual alternative to most commercial physical device servers which do support UDP.
I have done basic testing and verified that this patch compiled and worked on my setup (using port 4001 on both sides of UDP channel, and connecting to CNCB0 from com0com.
The command line to get this working talking to 192.168.1.204 on port 4001 for both is:
com2tcp.exe --udp \\.\CNCB0 192.168.1.204 4001 4001
The change is made through:
- minor modifications of the code to make TCP/UDP a parameter
- a new function static int com2udp2com() comming naturally next to com2tcp() and tcp2com()
One down side I see to this patch is that it could have been better to patch hub4com instead adding a udp driver, but still the job is done on com2tcp now.
Log in to post a comment.