fiatjaf on Nostr: I started writing that actually, but there was no WebSocket client, so I had to write ...
I started writing that actually, but there was no WebSocket client, so I had to write one from scratch. It kinda worked, but was probably too awful so I felt ashamed.
After that I didn't know how connect to multiple relays at the same time without using multiple threads, so I gave up until someone made that easier for me. What is the correct way to do that type of concurrency on Zig?
Published at
2025-03-29 20:07:30Event JSON
{
"id": "0000e60006526e0dda57639c083c263570f6a0b1d370b6a6dfabb4e5c8e604df",
"pubkey": "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
"created_at": 1743278850,
"kind": 1,
"tags": [
[
"p",
"11b9a89404dbf3034e7e1886ba9dc4c6d376f239a118271bd2ec567a889850ce"
],
[
"p",
"9bde421491f3ead1ac21bd1d01667aab947f4c1c4aed87624cf2273b06ca052b"
],
[
"e",
"e0dcc5cd59a8d190128b644ffda3ebdde96b1c32be8999cff9b37debd4bcf8f9",
"wss://relay.damus.io/",
"root"
],
[
"e",
"aab501820b8d14b8d9284059849b1b3d0d80d738b6520786b2ff62fa9062343f",
"wss://wot.utxo.one/",
"reply",
"11b9a89404dbf3034e7e1886ba9dc4c6d376f239a118271bd2ec567a889850ce"
],
[
"nonce",
"9223372036854787492",
"16"
]
],
"content": "I started writing that actually, but there was no WebSocket client, so I had to write one from scratch. It kinda worked, but was probably too awful so I felt ashamed.\n\nAfter that I didn't know how connect to multiple relays at the same time without using multiple threads, so I gave up until someone made that easier for me. What is the correct way to do that type of concurrency on Zig?",
"sig": "308d34eb97727d34944d5e2404847d8bafea57d020bb8c689f79026d5ccbd96bbdfa83a22d5a7b716f25abf2a3166da3314f462f7413be3ace929822a3c20660"
}