support wasm (#163)

This commit is contained in:
reis
2025-01-02 21:42:04 +09:00
committed by GitHub
parent a7a66add61
commit 63919cf685
13 changed files with 167 additions and 7 deletions

View File

@@ -1,3 +1,5 @@
//go:build !js
package nostr
import (
@@ -179,3 +181,7 @@ func (c *Connection) ReadMessage(ctx context.Context, buf io.Writer) error {
func (c *Connection) Close() error {
return c.conn.Close()
}
func (c *Connection) Ping(ctx context.Context) error {
return wsutil.WriteClientMessage(c.conn, ws.OpPing, nil)
}