code: func (m *mux) handleChannelOpen(packet []byte) error {
  	var msg channelOpenMsg
  	if err := Unmarshal(packet, &msg); err != nil {
  		return err
  	}
  
  	if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 {
  		failMsg := channelOpenFailureMsg{
  			PeersId:  msg.PeersId,
  			Reason:   ConnectionFailed,
  			Message:  "invalid request",
  			Language: "en_US.UTF-8",
  		}
  		return m.sendMessage(failMsg)
  	}
  
  	c := m.newChannel(msg.ChanType, channelInbound, msg.TypeSpecificData)
  	c.remoteId = msg.PeersId
  	c.maxRemotePayload = msg.MaxPacketSize
  	c.remoteWin.add(msg.PeersWindow)
  	m.incomingChannels <- c
  	return nil
  }
docs: // handleChannelOpen schedules a channel to be Accept()ed.