2 devices from one resource manager

Next resource manager question.

Is it possible for one program to create two devices, and a client to be able to open(), write()…
to each independantly.

So the client could send a write() to server1. server1’s write() function would then handle this.
Or do i have to have one write() function which sends the message to the correct server by means of a ___

i have managed to create two devices in one program.
However when i try (from a client) to write() to /dev/server1, it reaches the write() for /dev/server2



That’s odd. Did you accidentally provide the same resmgr_io_funcs_t to both calls to remsgr_attach() ?

A very important thing is, the resmgr_io_funcs passed in during resmgr_attach()
are only pointers. resmgr_attach() WILL NOT copy the whole structure. So you
better have both server1_io_funcs, and server2_iofuncs.

That was the problem.
Thanks guys.