code: func (rtm *RTM) receiveIncomingEvent() error {
  	event := json.RawMessage{}
  	err := rtm.conn.ReadJSON(&event)
  	switch {
  	case err == io.ErrUnexpectedEOF:
  		// EOF's don't seem to signify a failed connection so instead we ignore
  		// them here and detect a failed connection upon attempting to send a
  		// 'PING' message
  
  		// trigger a 'PING' to detect potential websocket disconnect
  		select {
  		case rtm.forcePing <- true:
  		case <-rtm.disconnected:
  		}
  	case err != nil:
  		// All other errors from ReadJSON come from NextReader, and should
  		// kill the read loop and force a reconnect.
  		rtm.IncomingEvents <- RTMEvent{"incoming_error", &IncomingEventError{
  			ErrorObj: err,
  		}}
  
  		select {
  		case rtm.killChannel <- false:
  		case <-rtm.disconnected:
  		}
  
  		return err
  	case len(event) == 0:
  		rtm.Debugln("Received empty event")
  	default:
  		rtm.Debugln("Incoming Event:", string(event))
  		select {
  		case rtm.rawEvents <- event:
  		case <-rtm.disconnected:
  			rtm.Debugln("disonnected while attempting to send raw event")
  		}
  	}
  	return nil
  }
docs: // receiveIncomingEvent attempts to receive an event from the RTM's websocket.
  // This will block until a frame is available from the websocket.
  // If the read from the websocket results in a fatal error, this function will return non-nil.