# Event routes

The 3 following routes are called when a socket is closed.

The corresponding $conid , $Ri , $Rp , $si , $sp and $proto variable will be available in the event routes.

Whether these routes are always called, never, or on a per socket basis is controlled by the closed_event parameter.

## `tcp:closed`

Called for each "normal" TCP socket closure by the other side (FIN,ACK).

## `tcp:timeout`

Called for connection timeouts (unanswered keepalives).

## `tcp:reset`

Called if the connection is reset by peer (RST).

## `Example`

    ...
    event_route[tcp:closed] {
    	xlog("L_INFO", "$proto connection closed ($conid)\n");
    }

    event_route[tcp:timeout] {
    	xlog("L_INFO", "$proto connection timed out ($conid)\n");
    }

    event_route[tcp:reset] {
    	xlog("L_INFO", "$proto connection reset by peer ($conid)\n");
    }
    ...