client.send(roomid, {}, msg); #### $ua->start($tx => sub ($ua, $tx) { say 'WebSocket handshake failed!' and return unless $tx->is_websocket; $tx->on(message => sub ($tx, $msg) { say "WebSocket message: $msg"; $tx->finish; }); $tx->send('some msg'); });