IO redirect engine with metadata
- by hawk.hsieh
Is there any C library or tool to redirect IO and be able to configured by a metadata. And provide a dynamic link library to perform custom process for feeding data into next IO.
For example,
network video recorder:
record video: socket do_something() file
preview video: socket do_something() PCI device
http service:
download file: socket do_something(http) file socket
post file: socket do_something(http) file
serial control:
monitor device: uart do_something(custom protocol) popen("zip") socket
I know the unix-like OS has IO redirect feature and integrate all application you want. Even socket IO you can use /dev/tcp or implement a process to redirect to stdout.
But this is process based , the process's foot print is big , IPC is heavy.
Therefore, I am looking for something to redirect IO in a process and the data redirect between IO is configurable with a metadata (XML,jason or others).