Async per-port connection handlers
|Reported by:||Jiri Svoboda||Owned by:|
|Blocker for:||Depends on:||#393|
Currently a server can set a single handler for all incoming connections using async_set_client_connection(). This makes it problematic to accommodate differt types of connections in a single server.
We have libraries/frameworks/APIs (e.g. libdrv, loc API) that register with a naming service and want to accept connections made via that naming service. We cannot have a server that would be a DDF driver and loc service provider, for example, because of this (each API wants to usurp the connection handler).
Currently a service is basically identified using a task ID. If we extend this identification with a port number and make services be identified with task ID:port number, we can easily compose multiple servers in a single task.
Port numbers would be assigned dynamically by the async framework and would be transparent to the user code. Port numbers would be transmitted as the first argument of a connect call.
- add function to allocate async port
- add function to register connection handler for a port (as an alternative to a catch-all connection handler)
- where desired, change the naming registration functions so that port where the service resides can be specified