I have a socket I'm doing select()
on it, waiting for other process to write.
Once it write, I read the data, and write it to another file descriptor.
My question is, if there's a way to bridge the socket to the file descriptor, so when there's data ready, it will be automatically written to the other file descriptor ?
This way, I could throw a way the buffer I'm using, and omit a thread in the system.