Hello all,
For quite some time now I've been looking for a way to have multiple,
random programs communicate with a single program (which sends/receives
data to/from an RS232 connection, in a way similar to TCP).
For that I need to be able to open a connection to send/receive data,
but also be able to listen for incoming connections from the other side
(and hand them of to whatever program is listening for them).
The problem is that I can't seem to figure out to let multiple, random programs communicate with the single program which allows the above.
I've been looking at several IPC methods (including using a TCP/IP
connection over 127.0.0.1), but none of them seem to allow for the 'listening' part.
Not quite.
The only place TCP/IP has in this is the similarity of the datablocks going over the eithernet / serial connection, and that I would like to be able to connect to a serial connection in the same way as WS2_32 / winsock API
allows it for an ethernet one.
IOW, the mentioning of TCP, IP and related is just for comparisions sake.
In a nutshell:
My target is to be able to write (a DLL which would allow) multiple programs to open multiple connections over a single serial port.
If it where for only a polling read- and write a datablock it would not be much of a problem. What started to be one is that I would like to be able
to "listen" for incoming serial connections - initiated by programs which connect to a "gatekeeper" (multiplexer) serial port handler.
Regards,
Rudy Wieser
Hello all,
For quite some time now I've been looking for a way to have multiple, random programs communicate with a single program (which sends/receives data
to/from an RS232 connection, in a way similar to TCP).
For that I need to be able to open a connection to send/receive data, but also be able to listen for incoming connections from the other side (and
hand them of to whatever program is listening for them).
The problem is that I can't seem to figure out to let multiple, random programs communicate with the single program which allows the above.
I've been looking at several IPC methods (including using a TCP/IP
connection over 127.0.0.1), but none of them seem to allow for the 'listening' part.
tl;dr:
I'm looking for a userland method which emulates the inter-process communication(?) ws2_32 / winsock uses. If someone knows about a website which has information about it or has information otherwise I would be much obliged.
If I understand you correctly, I've written several programs
that perform similar functions, i.e. listen for incoming TCP/IP
connections and pass data back and forth to an RS-232 port.
Is Named Pipe not applicable? It's basically an UDP wrapper/helper,
but for small traffic data.
TCP only allow specific IP and port to be bound by one listener.
Are you trying to avoid using WinSock?
Isn't that kind of like how PPP work? Something like "TCP/IP over
serial port"? Like how dial-up modem work?
JJ,
Isn't that kind of like how PPP work? Something like "TCP/IP overI think you're looking at the wrong part of the equation there.
serial port"? Like how dial-up modem work?
AFAIK PPP is just a simple, rather dumb driver which wraps the datablocks it than puts onto the serial connection and unwraps the received ones - which it gets or delivers to the TCP/IP stack software. It doesn't do anything in regard to managing requests toward multiple datastream connections from/to multiple programs.
My problem isn't the serial connection or how to serialize the datablocks, but how to allow multiple programs to access it at the same time. I know I will need a "gate keeper" (multiplexer) program for that.
The whole problem is how to have that "gate keeper" program communicate with other programs (and vice verse) which want to use the serial connection.
I think you are asking primarily about how the programs actually
communicate.
I found this https://docs.microsoft.com/en-us/windows/win32/dataxchg/about-dynamic-data-exchange
which may be of use
Though this page does suggest that you can simply send a message from
one program to another, which might do what you want.
Hope this is in some way helpful!
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 42:49:53 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,857,851 |