mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-09-05 20:50:34 +02:00
support wasm (#163)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user