# HG changeset patch # User Paul Boddie # Date 1669939228 -3600 # Node ID 50d9527c4df1ea54dae7b3bea385be683edff322 # Parent 3b84f92ed69c273cd1a1286b7f5c5ec277893c59 Updated the documentation to reflect idl4re and server configuration changes. diff -r 3b84f92ed69c -r 50d9527c4df1 docs/wiki/Server_Library --- a/docs/wiki/Server_Library Fri Dec 02 00:49:52 2022 +0100 +++ b/docs/wiki/Server_Library Fri Dec 02 01:00:28 2022 +0100 @@ -220,26 +220,20 @@ controlled by `libipc`: {{{ -int expected_items(); -ipc_server_handler_type handler(); +ipc_server_default_config_type config(); void *interface(); }}} -The `expected_items` operation returns the number of message items expected -from clients invoking server operations exposed via IPC. Typically, the -returned value will be calculated for a given server interface by a tool such -as `idl`, provided by the idl4re distribution. - -The `handler` operation returns a reference to a handler function able to -interpret the operation codes in incoming messages and to dispatch to the -appropriate operations provided by the resource. Typically, such a function +The `config` operation returns a default configuration object containing +details pertinent to the initialisation of a server for the resource, these +involving aspects of incoming messages and the handler function to deal with +such messages. Typically, such an object, along with the handler function, will be generated by a tool such as `idl`. -The `interface` operation returns a pointer to the resource instance, coerced -to an appropriate type for the handler function. Such a type will be that of -the most specialised IPC interface type inherited by the resource -implementation. The function returned by the `handler` operation will expect a -pointer to an instance of this appropriate type. +The `interface` operation returns a pointer to the resource instance coerced +to an appropriate type. Such a type will be that of the most specialised IPC +interface type inherited by the resource implementation, as expected by the +handler function for the resource. For example, consider the following: @@ -248,9 +242,10 @@ }}} Here, the `interface` operation will return a pointer coerced to -`MappedFileObject`, and the `handler` operation will return a reference to a -function expecting to be able to interpret this pointer as referring to -precisely that type. +`MappedFileObject`, and the `config` operation will return a suitable +configuration object. The `idl` tool will produce an object called +`config_MappedFileObject` for this purpose along with a handler function +called `handle_MappedFileObject` available via the configuration object. == Registries ==