add worker API to connect to websockets