fiatjaf
5bfaed2740
docstrings for many functions.
2025-03-04 11:42:44 -03:00
fiatjaf
1f36d7a9f1
increase websocket message limit to an absurd of 33MB.
2025-02-12 15:42:00 -03:00
fiatjaf
3e1c0ddc7e
fix pinging relays: use the main relay context, not the relay connection temporary context.
2025-01-17 14:08:54 -03:00
fiatjaf
06a15fdaab
follow list fetching test and related changes and fixes.
...
- make BatchedSubManyEose() use a single duplicate id index and use it for replaceable loaders;
- fixes parsing follow entry from kind:3 events (and others);
- adds a "cause" to most cancelation errors in relay/pool;
- remove the inherent cache from dataloader (we have our own hopefully);
- increase max frame size we can read from any websocket to 2**18 (262k), which gives over 2000 item lists.
2025-01-17 13:44:51 -03:00
fiatjaf
defc349e57
use coder/websocket for everything, get rid of gobwas.
...
supposedly it is faster, and anyway it's better to use it since we're already using it for wasm/js.
(previously named nhooyr/websocket).
2025-01-03 01:15:17 -03:00
reis
63919cf685
support wasm ( #163 )
2025-01-02 09:42:04 -03:00
fiatjaf
a35cdff6c8
problem: connection can be nil when writing and we're panic'ing.
2024-06-21 09:32:53 -03:00
ice-cronus
c0f1c4f510
add option to connect with custom TLS
2024-03-28 15:54:12 -03:00
Yasuhiro Matsumoto
d6baa2f74c
separate msgState for reader/writer
2023-11-06 13:29:19 -03:00
fiatjaf
35faff858a
reuse buffer when reading messages from websocket.
2023-07-30 17:12:30 -03:00
fiatjaf
030c1d1898
get rid of mutexes and use a single loop to prevent races.
...
in the meantime change the API to makes a little less error-prone.
2023-06-21 19:55:43 -03:00
Isaque Veras
58d56abe05
fix: removing redundancy
2023-06-12 08:18:29 -03:00
fiatjaf
fa00133825
websocket to send text, not binary.
2023-05-11 10:09:43 -03:00
fiatjaf
ccbb44989f
get rid of WriteJSON() and replace calls with manually marshaled envelopes.
2023-05-09 17:02:22 -03:00
Marc Tarnutzer
69b9d82bb1
check if messages are compressed on receive
2023-05-06 01:48:01 +02:00
Marc Tarnutzer
c86e907142
enable compression by default
2023-05-05 22:00:25 +02:00
Marc Tarnutzer
ee9502bc3e
fix: outgoing pings
2023-05-05 12:14:29 +02:00
Marc Tarnutzer
f152a5e0c7
simplify connection close
2023-05-04 23:54:39 +02:00
Marc Tarnutzer
9c01ead91f
switch to gobwas/ws, add compression
2023-05-04 23:51:15 +02:00
fiatjaf
326d2790de
rename interface{} to any.
2023-04-12 12:14:24 -03:00
fiatjaf
329b8d44d2
move stuff back from nostr package to top level.
...
because otherwise the path must be specified as github.com/fiatjaf/go-nostr/nostr, which is annoying.
2022-11-04 08:22:13 -03:00
BitcoinCoderBob
9549c3624a
nostr package, readme updates accordingly, matching example program ( #14 )
2022-10-12 17:24:30 -03:00
Honza Pokorny
a3df2cb893
Add mutexes around websockets
...
We replace the bare websocket.Conn type with a new Connection type which
implements `WriteJSON`, `WriteMessage`, and `Close`. The Connection
type adds mutexes around writes since gorilla doesn't support concurrent
writes to websockets.
Signed-off-by: Honza Pokorny <honza@pokorny.ca>
2022-01-12 12:19:33 -03:00