add_handler


Description:

[ Version ( since = "3.26" ) ]
public uint add_handler (string method, owned ServerHandler handler)

Adds a new handler that will be dispatched when a matching method arrives.

Parameters:

this

A Server

method

A method to handle

handler

A handler to execute when an incoming method matches methods

handler_data

User data for handler

handler_data_destroy

A destroy callback for handler_data

Returns:

A handler id that can be used to remove the handler with [method@Server.remove_handler].