Hello,
I have a program with multiple threads generating data. I would like for them to each write to a socket that I can attach a lex scanner to, so that single scanner can parse data coming from multiple sources.
I assume I would use a AF_UNIX socket for this, but is it best to use a SOCK_STREAM?
Is this possible? How do I set up the socket, and how do I set up the scanner to use it as input?
This is briefly mentioned in the lex man page, but I got the impression I would have to read a byte at a time for this to work - is that accurate?
I have a program with multiple threads generating data. I would like for them to each write to a socket that I can attach a lex scanner to, so that single scanner can parse data coming from multiple sources.
I assume I would use a AF_UNIX socket for this, but is it best to use a SOCK_STREAM?
Is this possible? How do I set up the socket, and how do I set up the scanner to use it as input?
This is briefly mentioned in the lex man page, but I got the impression I would have to read a byte at a time for this to work - is that accurate?