@@ -100,7 +100,7 @@ func (e *netError) Error() string { return e.msg }
100100func (e * netError ) Temporary () bool { return e .temporary }
101101func (e * netError ) Timeout () bool { return e .timeout }
102102
103- // CloseError represents close frame .
103+ // CloseError represents a close message .
104104type CloseError struct {
105105 // Code is defined in RFC 6455, section 11.7.
106106 Code int
@@ -342,7 +342,8 @@ func (c *Conn) Subprotocol() string {
342342 return c .subprotocol
343343}
344344
345- // Close closes the underlying network connection without sending or waiting for a close frame.
345+ // Close closes the underlying network connection without sending or waiting
346+ // for a close message.
346347func (c * Conn ) Close () error {
347348 return c .conn .Close ()
348349}
@@ -1034,7 +1035,7 @@ func (c *Conn) SetReadDeadline(t time.Time) error {
10341035}
10351036
10361037// SetReadLimit sets the maximum size for a message read from the peer. If a
1037- // message exceeds the limit, the connection sends a close frame to the peer
1038+ // message exceeds the limit, the connection sends a close message to the peer
10381039// and returns ErrReadLimit to the application.
10391040func (c * Conn ) SetReadLimit (limit int64 ) {
10401041 c .readLimit = limit
@@ -1047,16 +1048,16 @@ func (c *Conn) CloseHandler() func(code int, text string) error {
10471048
10481049// SetCloseHandler sets the handler for close messages received from the peer.
10491050// The code argument to h is the received close code or CloseNoStatusReceived
1050- // if the close message is empty. The default close handler sends a close frame
1051- // back to the peer.
1051+ // if the close message is empty. The default close handler sends a close
1052+ // message back to the peer.
10521053//
10531054// The application must read the connection to process close messages as
1054- // described in the section on Control Frames above.
1055+ // described in the section on Control Messages above.
10551056//
1056- // The connection read methods return a CloseError when a close frame is
1057+ // The connection read methods return a CloseError when a close message is
10571058// received. Most applications should handle close messages as part of their
10581059// normal error handling. Applications should only set a close handler when the
1059- // application must perform some action before sending a close frame back to
1060+ // application must perform some action before sending a close message back to
10601061// the peer.
10611062func (c * Conn ) SetCloseHandler (h func (code int , text string ) error ) {
10621063 if h == nil {
@@ -1075,11 +1076,11 @@ func (c *Conn) PingHandler() func(appData string) error {
10751076}
10761077
10771078// SetPingHandler sets the handler for ping messages received from the peer.
1078- // The appData argument to h is the PING frame application data. The default
1079+ // The appData argument to h is the PING message application data. The default
10791080// ping handler sends a pong to the peer.
10801081//
10811082// The application must read the connection to process ping messages as
1082- // described in the section on Control Frames above.
1083+ // described in the section on Control Messages above.
10831084func (c * Conn ) SetPingHandler (h func (appData string ) error ) {
10841085 if h == nil {
10851086 h = func (message string ) error {
@@ -1101,11 +1102,11 @@ func (c *Conn) PongHandler() func(appData string) error {
11011102}
11021103
11031104// SetPongHandler sets the handler for pong messages received from the peer.
1104- // The appData argument to h is the PONG frame application data. The default
1105+ // The appData argument to h is the PONG message application data. The default
11051106// pong handler does nothing.
11061107//
11071108// The application must read the connection to process ping messages as
1108- // described in the section on Control Frames above.
1109+ // described in the section on Control Messages above.
11091110func (c * Conn ) SetPongHandler (h func (appData string ) error ) {
11101111 if h == nil {
11111112 h = func (string ) error { return nil }
0 commit comments