add rpc interface from websockets to lua