Skip to content

Commit 80ddbb4

Browse files
committed
Simplify some docs
1 parent dd38de5 commit 80ddbb4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

websocket.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,7 @@ func (c *Conn) writer(ctx context.Context, typ MessageType) (io.WriteCloser, err
600600

601601
// Write is a convenience method to write a message to the connection.
602602
//
603-
// See the Writer method if you want to stream a message. The docs on Writer
604-
// regarding concurrency also apply to this method.
603+
// See the Writer method if you want to stream a message.
605604
func (c *Conn) Write(ctx context.Context, typ MessageType, p []byte) error {
606605
_, err := c.write(ctx, typ, p)
607606
if err != nil {
@@ -876,9 +875,9 @@ func init() {
876875

877876
// Ping sends a ping to the peer and waits for a pong.
878877
// Use this to measure latency or ensure the peer is responsive.
879-
// Ping must be called concurrently with Reader as otherwise it does
880-
// not read from the connection and relies on Reader to unblock
881-
// when the pong arrives.
878+
// Ping must be called concurrently with Reader as it does
879+
// not read from the connection but instead waits for a Reader call
880+
// to read the pong.
882881
//
883882
// TCP Keepalives should suffice for most use cases.
884883
func (c *Conn) Ping(ctx context.Context) error {

0 commit comments

Comments
 (0)