# Parameters

## `closed_event` (int)

If set to 0 (globally disabled), the "tcp:closed" event route will never be called on TCP disconnections.

If set to 1 (globally enabled), the "tcp:closed" event route will always be called on TCP disconnections.

If set to 2 ("manual" mode), the "tcp:closed" event route will only be called on TCP connections for which `tcp_enable_closed_event()` has been applied, when a disconnection occurs.

Default value is 1 (globally enabled).

### Set `closed_event` parameter

    ...
    modparam("tcpops", "closed_event", 0)
    ...

## `event_callback` (str)

The name of the function in the kemi configuration file (embedded scripting language such as Lua, Python, ...) to be executed instead of event_route[...] blocks.

The function receives a string parameter with the name of the event, the values are: 'tcp:closed', 'tcp:timeout', 'tcp:reset'.

Default value is 'empty' (no function is executed for events).

### Set `event_callback` parameter

    ...
    modparam("tcpops", "event_callback", "ksr_tcpops_event")
    ...
    -- event callback function implemented in Lua
    function ksr_tcpops_event(evname)
    	KSR.info("===== tcpops module triggered event: " .. evname .. "\n");
    	return 1;
    end
    ...