Server
Object Hierarchy:
Description:
[
CCode ( type_id =
"jsonrpc_server_get_type ()" ) ]
public class Server :
Object
A server for JSON-RPC communication
The Server class can help you implement a JSON-RPC server. You can accept connections and then communicate with
clients using the [class@Client] API.
Content:
Creation methods:
- public Server ()
Creates a new Server.
Methods:
- public void @foreach (Func foreach_func)
Calls foreach_func
for every client connected.
- public void accept_io_stream (IOStream io_stream)
This function accepts io_stream
as a new client to the
Server by wrapping it in a Client and starting
the message accept loop.
- public uint add_handler (string method, owned ServerHandler handler)
Adds a new handler that will be dispatched when a matching method
arrives.
- public void remove_handler (uint handler_id)
Removes a handler that was previously registered with [method@Server.
Signals:
Inherited Members:
All known members inherited from class GLib.Object