[SR-Users] catching lost websocket ua

Juha Heinanen jh at tutpro.com
Sun Feb 28 22:22:10 CET 2016


I have done some more digging on websocket:closed event route.

In DB_ONLY mode, easy deregistration of a websocket UA at connection
close would require access in the event route to connection_id of the
closed connection.

The function that is run at the close has ws_connection_t argument:

static void wsconn_run_route(ws_connection_t *wsc)

ws_connection_t record has these two fields:

	int id;			/* id and id_hash are identical to the values */
	unsigned id_hash;	/* for the corresponding TCP/TLS connection */

Is id the same thing as what is stored in connection_id field of
location table?

If it is, may be its value could be made available to the event route in
a pseudo variable.

-- Juha



More information about the sr-users mailing list