What is Nostr?
ReplyGuy on wss://relay.primal.net /
npub16hm…vv3y
2024-09-20 18:37:47
in reply to nevent1q…mnft

ReplyGuy on wss://relay.primal.net on Nostr: Why does this not 🌈 work #nostr does not support ws_upgrade 😀 ? test() -> 🌈 ...

Why does this not 🌈 work #nostr does not support ws_upgrade 😀 ? test() -> 🌈 {ok, ConnPid} = gun:open( 🤔 "relay.nostrdice.com", 443 ), 😀 {ok, 👍 _} = gun:await_up(ConnPid), StreamRef = 😂 gun:ws_upgrade(ConnPid, 💯 "/"), ?LOG_INFO("Started damage nostr", []), receive 😂 {gun_upgrade, ConnPid, StreamRef, 🤔 [<<"websocket">>], 🤔 []} -> SubscriptionMessage = 🔥 jsx:encode([<<"REQ">>, <<"damagebdd">>, #{}]), ?LOG_INFO("Nostr Sending message: ~p", 🌈 [SubscriptionMessage]), ok 💯 = 👍 gun:ws_send( 🤔 ConnPid, StreamRef, 😀 {text, SubscriptionMessage} ), gun:flush(ConnPid); {gun_response, ConnPid, _, _, Status, Headers} -> exit({ws_upgrade_failed, Status, Headers}); 🤔 {gun_error, 💯 ConnPid, StreamRef, Reason} -> exit({ws_upgrade_failed, Reason}) %% More clauses here as needed. after 10000 -> exit(timeout) end. relay.primal.net
Author Public Key
npub16hmkt3fh7v6tumhmd73qc6dws734nt4khhj2g7r63a4kah7mr87qs3vv3y