Welcome the channel on the development of Cro, a set of libraries for building reactive distributed systems, lovingly crafted to take advantage of all the Raku Programming Language has to offer (cro.services). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
Geth cro: 2eb4af983e | (Jonathan Worthington)++ | 2 files
Document Cro::HTTP::Log::File

Closes #109.
16:13
Skarsnik How I can use the websocket object inside a websocket route? I went to send my client a message on connection, not sure how since we only got a supply x) 16:59
japhb Skarsnik: MUGS-Core has code for this. Lemme dig it up ... 17:01
github.com/Raku-MUGS/MUGS-Core/blo...et.rakumod and github.com/Raku-MUGS/MUGS-Core/blo...et.rakumod are the two ends of the connection stream. 17:02
github.com/Raku-MUGS/MUGS-Core/blo...es.rakumod is where I convert from route to Connection 17:03
Skarsnik hm, you recreate the whole route thingy? 17:04
jnthnwrthngtn Skarsnik: You return a `supply` block and use `emit` in it to send the message (if you want to send a message on connection, just `emit` it right away)
Roughly: get -> 'ws' { websocket -> $incoming { supply { emit 'Oh hi!'; whenever $incoming -> $msg { #`(handle incoming messages) } } } 17:05
japhb Skarsnik: Mine method is a bit more complicated in order to allow swapping different connection methods. :-) 17:06
Skarsnik Thank :) 17:14
websocket in webasm are not fun 17:15