IO redirect engine with metadata
        Posted  
        
            by 
                hawk.hsieh
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by hawk.hsieh
        
        
        
        Published on 2012-09-13T02:56:46Z
        Indexed on 
            2012/09/13
            3:39 UTC
        
        
        Read the original article
        Hit count: 305
        
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).
© Stack Overflow or respective owner