Skip to content

Commit 8af7761

Browse files
committed
Mark Read and Write as experimental APIs
1 parent c211836 commit 8af7761

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

websocket.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,9 @@ func (c *Conn) writer(ctx context.Context, typ MessageType) (io.WriteCloser, err
464464
// Read is a convenience method to read a single message from the connection.
465465
//
466466
// See the Reader method if you want to be able to reuse buffers or want to stream a message.
467+
//
468+
// This is an experimental API, please let me know how you feel about it in
469+
// https://github.com/nhooyr/websocket/issues/62
467470
func (c *Conn) Read(ctx context.Context) (MessageType, []byte, error) {
468471
typ, r, err := c.Reader(ctx)
469472
if err != nil {
@@ -481,6 +484,9 @@ func (c *Conn) Read(ctx context.Context) (MessageType, []byte, error) {
481484
// Write is a convenience method to write a message to the connection.
482485
//
483486
// See the Writer method if you want to stream a message.
487+
//
488+
// This is an experimental API, please let me know how you feel about it in
489+
// https://github.com/nhooyr/websocket/issues/62
484490
func (c *Conn) Write(ctx context.Context, typ MessageType, p []byte) error {
485491
return c.writeMessage(ctx, opcode(typ), p)
486492
}

0 commit comments

Comments
 (0)