c - Clients/IP and Device Monitor -
Say I want to be a server that can accept socket connection and monitor which server is plugged in.
P>
The server can do two things.
Monitor / accept client connections through 1 TCP / IP; 2 Number 1 I'm planning to use Linux sockets to accept client connections. I'm planning to use the number 2 to monitor the library library device that has a tutorial on signal 11. I already have code on Linux sockets and Libudev.h .. but they are separate user space apps, I need to merge them as one. How should I do this?. Or any suggestions how can I do this? Thank you So do you want your I / O multiplex? If this is all you ask then you have a choice of options to choose the method or selection of traditional Unix method. - Or you can go for spawning thread for all those connections which require I / O. This is naturally the easiest option, but it is risky to maintain data integrity between two threads, locking and a concrete implementation of the race in the race conditions complicated (I think). You can of course still keep them as separate processes and use some method of IPC (shared memory, message queue, etc.) to unify the functionality of the two. This is probably a bit heavier than the Threaded option, but with better separation between the two processes, making it (potential) more flexible at the cost of more work. Can you clarify your question a bit more?
Comments
Post a Comment