code: func (w *Socket) write(mt int, payload []byte) error {
  	w.writeMutex.Lock()
  	defer w.writeMutex.Unlock()
  
  	w.ws.SetWriteDeadline(time.Now().Add(writeWait))
  	return w.ws.WriteMessage(mt, payload)
  }
docs: // write writes a message with the given message type and payload.
  // This method is thread-safe.