CloseNow closes the WebSocket connection without attempting a close handshake. Use when you do not want the overhead of the close handshake. note: No different from Close(StatusGoingAway, "") in WASM as there is no way to close a WebSocket without the close handshake.
()
| 242 | // note: No different from Close(StatusGoingAway, "") in WASM as there is no way to close |
| 243 | // a WebSocket without the close handshake. |
| 244 | func (c *Conn) CloseNow() error { |
| 245 | return c.Close(StatusGoingAway, "") |
| 246 | } |
| 247 | |
| 248 | func (c *Conn) exportedClose(code StatusCode, reason string) error { |
| 249 | c.closingMu.Lock() |