pippellia on Nostr: I've started programming seriously only 4 months ago, so there are many things that I ...
I've started programming seriously only 4 months ago, so there are many things that I still don't understand. Here is one:
Why do we always use websocket to connect to relays?
If I have to post or get one single event, why not a single http?
Why do I have to use http, then upgrade to websocket, then send/receive one event and then close the connection?
#asknostr
Published at
2025-02-01 08:47:17Event JSON
{
"id": "edc8516b80dec29430d463199d362e6f559193fac6ccd56c7de74ed9ca543667",
"pubkey": "f683e87035f7ad4f44e0b98cfbd9537e16455a92cd38cefc4cb31db7557f5ef2",
"created_at": 1738399637,
"kind": 1,
"tags": [
[
"t",
"asknostr"
]
],
"content": "I've started programming seriously only 4 months ago, so there are many things that I still don't understand. Here is one:\n\nWhy do we always use websocket to connect to relays?\nIf I have to post or get one single event, why not a single http?\n\nWhy do I have to use http, then upgrade to websocket, then send/receive one event and then close the connection?\n\n#asknostr ",
"sig": "779f03c93fc0bd669c5260dde313f8d6528a2e31abc58b8e0879da2c55618133f5fa60270107753b7bb76676e0d7e43a852dc6f7b327dc58388567ea3a9936bc"
}