Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Riot.Gen_serverreq is the type of all generic server requests and responses.
When defining a new generic server you want to extend this with the your custom request types, including the response type in its type variable. Like this:
open Riot
type _ Gen_server.req +=
| Is_connected : bool Gen_server.req
| Profile : profile_req -> profile_res Gen_server.reqmodule type Impl = sig ... endImpl is the module type of the generic server base implementations. You can use this type when defining new gen servers like this:
call pid req will send a type-safe request req to the generic server behind pid that is guaranteed to return a respone with type `'res`
This function will block the current process until a response arrives.
TODO(leostera): add ?timeout param